diff options
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/activities/RPANActivity.java | 7 | ||||
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/RPANActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/RPANActivity.java index 76ec456b..5d2d47f4 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/RPANActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/RPANActivity.java @@ -30,6 +30,7 @@ import com.evernote.android.state.State; import com.google.android.material.snackbar.Snackbar; import com.livefront.bridge.Bridge; +import org.greenrobot.eventbus.EventBus; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -350,6 +351,12 @@ public class RPANActivity extends AppCompatActivity { return false; } + @Override + protected void onDestroy() { + super.onDestroy(); + EventBus.getDefault().unregister(this); + } + private void shareLink(String link) { try { Intent intent = new Intent(Intent.ACTION_SEND); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java index fa9ac0f0..db550a4f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/TrendingActivity.java @@ -294,6 +294,12 @@ public class TrendingActivity extends BaseActivity { } @Override + protected void onDestroy() { + super.onDestroy(); + EventBus.getDefault().unregister(this); + } + + @Override protected SharedPreferences getDefaultSharedPreferences() { return mSharedPreferences; } |