continue;
}
if (newPost.getTime() < getSoneFollowingTime(sone)) {
- newPost.setKnown(true);
+ newPost.setKnown();
} else if (!newPost.isKnown()) {
eventBus.post(new NewPostFoundEvent(newPost));
}
}
database.storePosts(sone, posts);
for (Post post : posts) {
- post.setKnown(true);
+ post.setKnown();
}
database.storePostReplies(sone, replies);
for (PostReply reply : replies) {
* The post to mark as known
*/
public void markPostKnown(Post post) {
- post.setKnown(true);
+ post.setKnown();
eventBus.post(new MarkPostKnownEvent(post));
touchConfiguration();
for (PostReply reply : post.getReplies()) {
webOfTrustUpdater.stop();
updateChecker.stop();
soneDownloader.stop();
- soneDownloaders.shutdown();
identityManager.stop();
+ soneDownloaders.shutdownNow();
}
//
configuration.getStringValue("SoneFollowingTimes/" + soneCounter + "/Sone").setValue(null);
}
- /* save known posts. */
- database.save();
-
/* save bookmarked posts. */
int bookmarkedPostCounter = 0;
synchronized (bookmarkedPosts) {
} catch (ConfigurationException ce1) {
logger.log(Level.SEVERE, "Could not store configuration!", ce1);
- } catch (DatabaseException de1) {
- logger.log(Level.SEVERE, "Could not save database!", de1);
} finally {
synchronized (configuration) {
storingConfiguration = false;