Browse Source

Cleaning up bookmark initialization logic

master
anthony restaino 8 years ago
parent
commit
6765ec96e5
  1. 6
      app/src/main/java/acr/browser/lightning/app/BrowserApp.java

6
app/src/main/java/acr/browser/lightning/app/BrowserApp.java

@ -87,14 +87,14 @@ public class BrowserApp extends Application { @@ -87,14 +87,14 @@ public class BrowserApp extends Application {
List<HistoryItem> oldBookmarks = LegacyBookmarkManager.destructiveGetBookmarks(BrowserApp.this);
if (!oldBookmarks.isEmpty()) {
// If there are old bookmarks, import them
mBookmarkModel.addBookmarkList(oldBookmarks).subscribeOn(Schedulers.io()).subscribe();
} else {
if (mBookmarkModel.count() == 0) {
} else if (mBookmarkModel.count() == 0) {
// If the database is empty, fill it from the assets list
List<HistoryItem> assetsBookmarks = BookmarkExporter.importBookmarksFromAssets(BrowserApp.this);
mBookmarkModel.addBookmarkList(assetsBookmarks).subscribeOn(Schedulers.io()).subscribe();
}
}
}
});
if (mPreferenceManager.getUseLeakCanary() && !isRelease()) {

Loading…
Cancel
Save