From e1f20f0866307ea8a4e54785df1db3c25f660ef8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 9 Nov 2014 11:55:58 +0100 Subject: [PATCH] =?utf8?q?Use=20=E2=80=9CisLoaded=E2=80=9D=20method=20to?= =?utf8?q?=20check=20for=20not-yet=20loaded=20bookmarks.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/web/BookmarksPage.java | 2 +- src/main/java/net/pterodactylus/sone/web/UnbookmarkPage.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/web/BookmarksPage.java b/src/main/java/net/pterodactylus/sone/web/BookmarksPage.java index 373ff18..0f53572 100644 --- a/src/main/java/net/pterodactylus/sone/web/BookmarksPage.java +++ b/src/main/java/net/pterodactylus/sone/web/BookmarksPage.java @@ -68,7 +68,7 @@ public class BookmarksPage extends SoneTemplatePage { @Override public boolean apply(Post post) { - return post.getSone() != null; + return post.isLoaded(); } }); List sortedPosts = new ArrayList(loadedPosts); diff --git a/src/main/java/net/pterodactylus/sone/web/UnbookmarkPage.java b/src/main/java/net/pterodactylus/sone/web/UnbookmarkPage.java index 7dfe301..72ff2fc 100644 --- a/src/main/java/net/pterodactylus/sone/web/UnbookmarkPage.java +++ b/src/main/java/net/pterodactylus/sone/web/UnbookmarkPage.java @@ -67,7 +67,7 @@ public class UnbookmarkPage extends SoneTemplatePage { if (id.equals("allNotLoaded")) { Set posts = webInterface.getCore().getBookmarkedPosts(); for (Post post : posts) { - if (post.getSone() == null) { + if (post.isLoaded()) { webInterface.getCore().unbookmarkPost(post); } } -- 2.7.4