Skip to content

Commit

Permalink
Update BookNamesake.java
Browse files Browse the repository at this point in the history
  • Loading branch information
amberin authored May 18, 2024
1 parent 368f268 commit 1f7dc69
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions app/src/main/java/com/orgzly/android/sync/BookNamesake.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,19 @@ public void updateStatus(int reposCount) {
status = BookSyncStatus.ONLY_BOOK_WITH_LINK;
}
} else { /* Only local book without link. */
if (reposCount > 1) {
status = BookSyncStatus.ONLY_BOOK_WITHOUT_LINK_AND_MULTIPLE_REPOS;
if (book.hasSync()) {
// Book has been synced previously, but lost its link.
status = BookSyncStatus.SYNCED_BOOK_WITHOUT_LINK;
} else {
status = BookSyncStatus.ONLY_BOOK_WITHOUT_LINK_AND_ONE_REPO;
} // TODO: What about no repos?
// Book has never been synced.
if (reposCount > 1) {
status = BookSyncStatus.ONLY_BOOK_WITHOUT_LINK_AND_MULTIPLE_REPOS;
} else {
status = BookSyncStatus.ONLY_BOOK_WITHOUT_LINK_AND_ONE_REPO;
} // TODO: What about no repos?
}
}
}

return;
}

Expand Down

0 comments on commit 1f7dc69

Please sign in to comment.