Don’t save bookmarks from the core anymore, the database does that now.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index 87f59c2..c6476ef 100644 (file)
@@ -1611,13 +1611,6 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                        /* save known posts. */
                        database.save();
 
-                       /* save bookmarked posts. */
-                       int bookmarkedPostCounter = 0;
-                       for (Post bookmarkedPost : getBookmarkedPosts()) {
-                               configuration.getStringValue("Bookmarks/Post/" + bookmarkedPostCounter++ + "/ID").setValue(bookmarkedPost.getId());
-                       }
-                       configuration.getStringValue("Bookmarks/Post/" + bookmarkedPostCounter++ + "/ID").setValue(null);
-
                        /* now save it. */
                        configuration.save();
 
@@ -1663,17 +1656,6 @@ public class Core extends AbstractService implements SoneProvider, PostProvider,
                        }
                        ++soneCounter;
                }
-
-               /* load bookmarked posts. */
-               int bookmarkedPostCounter = 0;
-               while (true) {
-                       String bookmarkedPostId = configuration.getStringValue("Bookmarks/Post/" + bookmarkedPostCounter++ + "/ID").getValue(null);
-                       if (bookmarkedPostId == null) {
-                               break;
-                       }
-                       database.bookmarkPost(bookmarkedPostId);
-               }
-
        }
 
        /**