projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove unused plugin.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
web
/
WebInterface.java
diff --git
a/src/main/java/net/pterodactylus/sone/web/WebInterface.java
b/src/main/java/net/pterodactylus/sone/web/WebInterface.java
index
faba61f
..
ea1cb83
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/web/WebInterface.java
+++ b/
src/main/java/net/pterodactylus/sone/web/WebInterface.java
@@
-150,11
+150,6
@@
import net.pterodactylus.util.web.RedirectPage;
import net.pterodactylus.util.web.StaticPage;
import net.pterodactylus.util.web.TemplatePage;
import net.pterodactylus.util.web.StaticPage;
import net.pterodactylus.util.web.TemplatePage;
-import com.google.common.collect.Collections2;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.eventbus.Subscribe;
-import com.google.inject.Inject;
-
import freenet.clients.http.SessionManager;
import freenet.clients.http.SessionManager.Session;
import freenet.clients.http.ToadletContainer;
import freenet.clients.http.SessionManager;
import freenet.clients.http.SessionManager.Session;
import freenet.clients.http.ToadletContainer;
@@
-162,6
+157,11
@@
import freenet.clients.http.ToadletContext;
import freenet.l10n.BaseL10n;
import freenet.support.api.HTTPRequest;
import freenet.l10n.BaseL10n;
import freenet.support.api.HTTPRequest;
+import com.google.common.collect.Collections2;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.eventbus.Subscribe;
+import com.google.inject.Inject;
+
/**
* Bundles functionality that a web interface of a Freenet plugin needs, e.g.
* references to l10n helpers.
/**
* Bundles functionality that a web interface of a Freenet plugin needs, e.g.
* references to l10n helpers.
@@
-246,7
+246,7
@@
public class WebInterface {
public WebInterface(SonePlugin sonePlugin) {
this.sonePlugin = sonePlugin;
formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword();
public WebInterface(SonePlugin sonePlugin) {
this.sonePlugin = sonePlugin;
formPassword = sonePlugin.pluginRespirator().getToadletContainer().getFormPassword();
- soneTextParser = new SoneTextParser(getCore()
, getCor
e());
+ soneTextParser = new SoneTextParser(getCore()
.getDatabas
e());
templateContextFactory = new TemplateContextFactory();
templateContextFactory.addAccessor(Object.class, new ReflectionAccessor());
templateContextFactory = new TemplateContextFactory();
templateContextFactory.addAccessor(Object.class, new ReflectionAccessor());
@@
-423,7
+423,7
@@
public class WebInterface {
if (soneId == null) {
return null;
}
if (soneId == null) {
return null;
}
- return getCore().getLocalSone(soneId
, false
);
+ return getCore().getLocalSone(soneId
).orNull(
);
}
/**
}
/**
@@
-862,7
+862,7
@@
public class WebInterface {
notificationManager.addNotification(mentionNotification);
}
} else {
notificationManager.addNotification(mentionNotification);
}
} else {
-
getCore().markReplyKnown(reply
);
+
reply.modify().setKnown().update(getCore().postReplyUpdated()
);
}
}
}
}
@@
-940,7
+940,7
@@
public class WebInterface {
localReplyNotification.remove(reply);
if (!getMentionedSones(reply.getText()).isEmpty() && reply.getPost().isPresent()) {
boolean isMentioned = false;
localReplyNotification.remove(reply);
if (!getMentionedSones(reply.getText()).isEmpty() && reply.getPost().isPresent()) {
boolean isMentioned = false;
- for (PostReply existingReply :
getCore().getReplies(reply.getPost().get()
)) {
+ for (PostReply existingReply :
reply.getPost().transform(Post.TO_REPLIES).get(
)) {
isMentioned |= !reply.isKnown() && !getMentionedSones(existingReply.getText()).isEmpty();
}
if (!isMentioned) {
isMentioned |= !reply.isKnown() && !getMentionedSones(existingReply.getText()).isEmpty();
}
if (!isMentioned) {