Let Config implement Observable

This commit is contained in:
yushijinhun
2018-07-09 21:58:18 +08:00
parent 5cf6ef88a6
commit b0d71a5511
2 changed files with 48 additions and 2 deletions

View File

@@ -62,4 +62,8 @@ public class ObservableHelper implements Observable, InvalidationListener {
this.invalidate();
}
public void receiveUpdatesFrom(Observable observable) {
observable.removeListener(this); // remove the previously added listener(if any)
observable.addListener(this);
}
}