mirror of https://github.com/zlatinb/muwire
pause after publishing all trust events
parent
b96d997037
commit
b0d09853e4
|
@ -191,15 +191,14 @@ public class TrustServlet extends HttpServlet {
|
|||
event.setPersona(p);
|
||||
event.setSubscribe(true);
|
||||
core.getEventBus().publish(event);
|
||||
Util.pause();
|
||||
} else if (action.equals("unsubscribe")) {
|
||||
core.getMuOptions().getTrustSubscriptions().remove(p);
|
||||
TrustSubscriptionEvent event = new TrustSubscriptionEvent();
|
||||
event.setPersona(p);
|
||||
event.setSubscribe(false);
|
||||
core.getEventBus().publish(event);
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {}
|
||||
Util.pause();
|
||||
} else if (action.equals("trust")) {
|
||||
doTrust(p, TrustLevel.TRUSTED, req.getParameter("reason"));
|
||||
} else if (action.equals("neutral")) {
|
||||
|
@ -215,6 +214,7 @@ public class TrustServlet extends HttpServlet {
|
|||
event.setPersona(p);
|
||||
event.setReason(reason);
|
||||
core.getEventBus().publish(event);
|
||||
Util.pause();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,6 +13,12 @@ import net.i2p.util.Translate;
|
|||
|
||||
public class Util {
|
||||
|
||||
static void pause() {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {}
|
||||
}
|
||||
|
||||
private static final I2PAppContext _context = I2PAppContext.getGlobalContext();
|
||||
|
||||
private static final String escapeChars[] = {"&", "\"", "<", ">", "'"};
|
||||
|
|
Loading…
Reference in New Issue