mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-29 04:17:12 +01:00
Unregister EventBus listener in onDestroy in TrendingActivity and RPANActivity.
This commit is contained in:
parent
03f8741f3d
commit
037223e286
@ -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);
|
||||
|
@ -293,6 +293,12 @@ public class TrendingActivity extends BaseActivity {
|
||||
outState.putParcelableArrayList(TRENDING_SEARCHES_STATE, trendingSearches);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
EventBus.getDefault().unregister(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected SharedPreferences getDefaultSharedPreferences() {
|
||||
return mSharedPreferences;
|
||||
|
Loading…
Reference in New Issue
Block a user