mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
Catalog`s visibility code cleanup (2)
git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@1377 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
parent
52940ddf81
commit
458b1e33ff
6 changed files with 15 additions and 15 deletions
|
@ -49,7 +49,7 @@ public class NetworkLibrary {
|
|||
private final RootTree myRootTree = new RootTree();
|
||||
|
||||
private boolean myUpdateChildren = true;
|
||||
private boolean myUpdateAccountDependents;
|
||||
private boolean myUpdateVisibility;
|
||||
|
||||
private static class LinksComparator implements Comparator<NetworkLink> {
|
||||
public int compare(NetworkLink link1, NetworkLink link2) {
|
||||
|
@ -123,8 +123,8 @@ public class NetworkLibrary {
|
|||
myUpdateChildren = true;
|
||||
}
|
||||
|
||||
public void invalidateAccountDependents() {
|
||||
myUpdateAccountDependents = true;
|
||||
public void invalidateVisibility() {
|
||||
myUpdateVisibility = true;
|
||||
}
|
||||
|
||||
private void makeUpToDate() {
|
||||
|
@ -192,12 +192,12 @@ public class NetworkLibrary {
|
|||
}
|
||||
}
|
||||
|
||||
private void updateAccountDependents() {
|
||||
private void updateVisibility() {
|
||||
for (FBTree tree: myRootTree.subTrees()) {
|
||||
if (!(tree instanceof NetworkCatalogTree)) {
|
||||
continue;
|
||||
}
|
||||
((NetworkCatalogTree) tree).updateAccountDependents();
|
||||
((NetworkCatalogTree) tree).updateVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -206,9 +206,9 @@ public class NetworkLibrary {
|
|||
myUpdateChildren = false;
|
||||
makeUpToDate();
|
||||
}
|
||||
if (myUpdateAccountDependents) {
|
||||
myUpdateAccountDependents = false;
|
||||
updateAccountDependents();
|
||||
if (myUpdateVisibility) {
|
||||
myUpdateVisibility = false;
|
||||
updateVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue