X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FCore.java;h=811950d2cd35f9f0ea738626ab227ae91a9cb6e6;hp=da2a2a11d36d1e96726322bf4b98b8b374c2a07a;hb=bbd0a9e769d18091f7c15a1b87a6316f5abb88a1;hpb=36a0267479a22637095f901fc51fa99320329e14 diff --git a/src/main/java/net/pterodactylus/sone/core/Core.java b/src/main/java/net/pterodactylus/sone/core/Core.java index da2a2a1..811950d 100644 --- a/src/main/java/net/pterodactylus/sone/core/Core.java +++ b/src/main/java/net/pterodactylus/sone/core/Core.java @@ -24,8 +24,8 @@ import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; -import java.util.Set; import java.util.Map.Entry; +import java.util.Set; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.logging.Level; @@ -40,12 +40,12 @@ import net.pterodactylus.sone.data.Image; import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.PostReply; import net.pterodactylus.sone.data.Profile; +import net.pterodactylus.sone.data.Profile.Field; import net.pterodactylus.sone.data.Reply; import net.pterodactylus.sone.data.Sone; -import net.pterodactylus.sone.data.TemporaryImage; -import net.pterodactylus.sone.data.Profile.Field; import net.pterodactylus.sone.data.Sone.ShowCustomAvatars; import net.pterodactylus.sone.data.Sone.SoneStatus; +import net.pterodactylus.sone.data.TemporaryImage; import net.pterodactylus.sone.fcp.FcpInterface; import net.pterodactylus.sone.fcp.FcpInterface.FullAccessRequired; import net.pterodactylus.sone.freenet.wot.Identity; @@ -1293,8 +1293,8 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis } /** - * Marks the given Sone as known. If the Sone was {@link #isNewPost(String) - * new} before, a {@link CoreListener#markSoneKnown(Sone)} event is fired. + * Marks the given Sone as known. If the Sone was not {@link Post#isKnown() + * known} before, a {@link CoreListener#markSoneKnown(Sone)} event is fired. * * @param sone * The Sone to mark as known @@ -1641,8 +1641,8 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis } /** - * Marks the given post as known, if it is currently a new post (according - * to {@link #isNewPost(String)}). + * Marks the given post as known, if it is currently not a known post + * (according to {@link Post#isKnown()}). * * @param post * The post to mark as known @@ -1655,6 +1655,9 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis touchConfiguration(); } } + for (PostReply reply : getReplies(post)) { + markReplyKnown(reply); + } } /** @@ -1780,8 +1783,8 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis } /** - * Marks the given reply as known, if it is currently a new reply (according - * to {@link #isNewReply(String)}). + * Marks the given reply as known, if it is currently not a known reply + * (according to {@link Reply#isKnown()}). * * @param reply * The reply to mark as known @@ -2405,7 +2408,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis */ @Override public void ownIdentityAdded(OwnIdentity ownIdentity) { - logger.log(Level.FINEST, "Adding OwnIdentity: " + ownIdentity); + logger.log(Level.FINEST, "Adding OwnIdentity: %s", ownIdentity); if (ownIdentity.hasContext("Sone")) { trustedIdentities.put(ownIdentity, Collections.synchronizedSet(new HashSet())); addLocalSone(ownIdentity); @@ -2426,7 +2429,7 @@ public class Core extends AbstractService implements IdentityListener, UpdateLis */ @Override public void identityAdded(OwnIdentity ownIdentity, Identity identity) { - logger.log(Level.FINEST, "Adding Identity: " + identity); + logger.log(Level.FINEST, "Adding Identity: %s", identity); trustedIdentities.get(ownIdentity).add(identity); addRemoteSone(identity); }