Replace PreferencesTest with Kotlin version
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Preferences.java
index 56bfa73..73d964c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Sone - Preferences.java - Copyright © 2013 David Roden
+ * Sone - Preferences.java - Copyright © 2013–2016 David Roden
  *
  * 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
@@ -39,8 +39,6 @@ import com.google.common.eventbus.EventBus;
 /**
  * Convenience interface for external classes that want to access the core’s
  * configuration.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
  */
 public class Preferences {
 
@@ -105,6 +103,7 @@ public class Preferences {
        public Preferences setInsertionDelay(Integer insertionDelay) {
                this.insertionDelay.set(insertionDelay);
                eventBus.post(new InsertionDelayChangedEvent(getInsertionDelay()));
+               eventBus.post(new PreferenceChangedEvent("InsertionDelay", getInsertionDelay()));
                return this;
        }
 
@@ -138,6 +137,7 @@ public class Preferences {
         */
        public Preferences setPostsPerPage(Integer postsPerPage) {
                this.postsPerPage.set(postsPerPage);
+               eventBus.post(new PreferenceChangedEvent("PostsPerPage", getPostsPerPage()));
                return this;
        }