✨ Activate debug mode on event
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 28 Jul 2019 16:29:35 +0000 (18:29 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 28 Jul 2019 19:07:12 +0000 (21:07 +0200)
src/main/java/net/pterodactylus/sone/web/WebInterface.java

index 4a572a2..12526df 100644 (file)
@@ -40,25 +40,7 @@ import javax.annotation.Nullable;
 
 import net.pterodactylus.sone.core.Core;
 import net.pterodactylus.sone.core.ElementLoader;
-import net.pterodactylus.sone.core.event.ImageInsertAbortedEvent;
-import net.pterodactylus.sone.core.event.ImageInsertFailedEvent;
-import net.pterodactylus.sone.core.event.ImageInsertFinishedEvent;
-import net.pterodactylus.sone.core.event.ImageInsertStartedEvent;
-import net.pterodactylus.sone.core.event.MarkPostKnownEvent;
-import net.pterodactylus.sone.core.event.MarkPostReplyKnownEvent;
-import net.pterodactylus.sone.core.event.MarkSoneKnownEvent;
-import net.pterodactylus.sone.core.event.NewPostFoundEvent;
-import net.pterodactylus.sone.core.event.NewPostReplyFoundEvent;
-import net.pterodactylus.sone.core.event.NewSoneFoundEvent;
-import net.pterodactylus.sone.core.event.PostRemovedEvent;
-import net.pterodactylus.sone.core.event.PostReplyRemovedEvent;
-import net.pterodactylus.sone.core.event.SoneInsertAbortedEvent;
-import net.pterodactylus.sone.core.event.SoneInsertedEvent;
-import net.pterodactylus.sone.core.event.SoneInsertingEvent;
-import net.pterodactylus.sone.core.event.SoneLockedEvent;
-import net.pterodactylus.sone.core.event.SoneRemovedEvent;
-import net.pterodactylus.sone.core.event.SoneUnlockedEvent;
-import net.pterodactylus.sone.core.event.UpdateFoundEvent;
+import net.pterodactylus.sone.core.event.*;
 import net.pterodactylus.sone.data.Image;
 import net.pterodactylus.sone.data.Post;
 import net.pterodactylus.sone.data.PostReply;
@@ -981,4 +963,9 @@ public class WebInterface implements SessionProvider {
                notificationManager.addNotification(imageInsertFailedNotification);
        }
 
+       @Subscribe
+       public void debugActivated(@Nonnull DebugActivatedEvent debugActivatedEvent) {
+               pageToadletRegistry.activateDebugMode();
+       }
+
 }