*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
import net.pterodactylus.sone.data.Reply;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.util.template.Accessor;
import net.pterodactylus.sone.data.Reply;
import net.pterodactylus.sone.data.Sone;
import net.pterodactylus.util.template.Accessor;
if ("likes".equals(member)) {
return core.getLikes(reply);
} else if (member.equals("liked")) {
Sone currentSone = (Sone) templateContext.get("currentSone");
return (currentSone != null) && (currentSone.isLikedReplyId(reply.getId()));
} else if (member.equals("new")) {
if ("likes".equals(member)) {
return core.getLikes(reply);
} else if (member.equals("liked")) {
Sone currentSone = (Sone) templateContext.get("currentSone");
return (currentSone != null) && (currentSone.isLikedReplyId(reply.getId()));
} else if (member.equals("new")) {
- return core.isNewReply(reply.getId(), false);
+ return !reply.isKnown();
+ } else if (member.equals("loaded")) {
+ return reply.getSone() != null;