aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml
diff options
context:
space:
mode:
authorDocile-Alligator <chineseperson5@gmail.com>2020-06-22 15:41:20 +0000
committerGitHub <noreply@github.com>2020-06-22 15:41:20 +0000
commit405cac91e81d3cc2219a7c9e7163ff079e6d0e7a (patch)
tree5250a0aeb92c5e8a94bfa2f855ff5c8b9c0d9a2d /app/src/main/java/ml
parenteda7a64c14cf83a1a0647cab831b00e434d7edc2 (diff)
parentdc39cb72afe70dbc6a42ef6a62669dda5603c2c5 (diff)
downloadinfinity-for-reddit-405cac91e81d3cc2219a7c9e7163ff079e6d0e7a.tar
infinity-for-reddit-405cac91e81d3cc2219a7c9e7163ff079e6d0e7a.tar.gz
infinity-for-reddit-405cac91e81d3cc2219a7c9e7163ff079e6d0e7a.tar.bz2
infinity-for-reddit-405cac91e81d3cc2219a7c9e7163ff079e6d0e7a.tar.lz
infinity-for-reddit-405cac91e81d3cc2219a7c9e7163ff079e6d0e7a.tar.xz
infinity-for-reddit-405cac91e81d3cc2219a7c9e7163ff079e6d0e7a.tar.zst
infinity-for-reddit-405cac91e81d3cc2219a7c9e7163ff079e6d0e7a.zip
Merge pull request #140 from OHermesJunior/eventbus-index
Enable EventBus Index, avoids reflection, and better performance.
Diffstat (limited to 'app/src/main/java/ml')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/Infinity.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Infinity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Infinity.java
index 90478a08..04edd825 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Infinity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Infinity.java
@@ -17,6 +17,7 @@ import org.greenrobot.eventbus.EventBus;
import ml.docilealligator.infinityforreddit.BroadcastReceiver.NetworkWifiStatusReceiver;
import ml.docilealligator.infinityforreddit.Event.ChangeWifiStatusEvent;
import ml.docilealligator.infinityforreddit.Utils.Utils;
+import ml.docilealligator.inifinityforreddit.EventBusIndex;
public class Infinity extends Application {
private AppComponent mAppComponent;
@@ -42,6 +43,8 @@ public class Infinity extends Application {
}
});
+ EventBus.builder().addIndex(new EventBusIndex()).installDefaultEventBus();
+
mNetworkWifiStatusReceiver =
new NetworkWifiStatusReceiver(() -> EventBus.getDefault().post(new ChangeWifiStatusEvent(Utils.isConnectedToWifi(getApplicationContext()))));
registerReceiver(mNetworkWifiStatusReceiver, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION));