Skip to content

Commit

Permalink
fix favorit folders in the library view
Browse files Browse the repository at this point in the history
  • Loading branch information
foobnix committed Feb 12, 2019
1 parent 18118b1 commit 282e504
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions app/src/main/java/com/foobnix/ui2/BooksService.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,17 @@ protected void onHandleIntent(Intent intent) {
}

File bookFile = new File(meta.getPath());
if (!bookFile.exists()) {
meta.setIsSearchBook(false);
AppDB.get().update(meta);
LOG.d(TAG, "Delete-setIsSearchBook false", meta.getPath());
} else if (bookFile.exists() && meta.getIsSearchBook() != null && !meta.getIsSearchBook()) {
meta.setIsSearchBook(true);
AppDB.get().update(meta);
LOG.d(TAG, "Delete-setIsSearchBook true", meta.getPath());
if(bookFile.isFile()) {
if (!bookFile.exists()) {
meta.setIsSearchBook(false);
AppDB.get().update(meta);
LOG.d(TAG, "Delete-setIsSearchBook false", meta.getPath());
} else if (bookFile.exists() && meta.getIsSearchBook() != null && !meta.getIsSearchBook()) {
meta.setIsSearchBook(true);
AppDB.get().update(meta);
LOG.d(TAG, "Delete-setIsSearchBook true", meta.getPath());

}
}
}
sendFinishMessage();
Expand Down

0 comments on commit 282e504

Please sign in to comment.