mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-04 02:09:35 +02:00
custom catalog activity (in progress); duplicate custom catalogs are allowed
This commit is contained in:
parent
4a306a0427
commit
1adfbf95bd
10 changed files with 132 additions and 299 deletions
|
@ -303,11 +303,6 @@ public class NetworkLibrary {
|
|||
myUpdateVisibility = true;
|
||||
}
|
||||
|
||||
|
||||
private static boolean linksEqual(INetworkLink l1, INetworkLink l2) {
|
||||
return l1 == l2 || l1.getSiteName().equals(l2.getSiteName());
|
||||
}
|
||||
|
||||
private static boolean linkIsInvalid(INetworkLink link, INetworkLink nodeLink) {
|
||||
if (link instanceof ICustomNetworkLink) {
|
||||
if (link != nodeLink) {
|
||||
|
@ -347,7 +342,7 @@ public class NetworkLibrary {
|
|||
continue;
|
||||
}
|
||||
final INetworkLink nodeLink = ((NetworkCatalogTree) currentNode).Item.Link;
|
||||
if (linksEqual(link, nodeLink)) {
|
||||
if (link == nodeLink) {
|
||||
if (linkIsInvalid(link, nodeLink)) {
|
||||
toRemove.add(currentNode);
|
||||
} else {
|
||||
|
@ -360,7 +355,7 @@ public class NetworkLibrary {
|
|||
INetworkLink newNodeLink = null;
|
||||
for (int j = i; j < links.size(); ++j) {
|
||||
final INetworkLink jlnk = links.get(j);
|
||||
if (linksEqual(nodeLink, jlnk)) {
|
||||
if (nodeLink == jlnk) {
|
||||
newNodeLink = jlnk;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue