mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-30 21:07:11 +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.google.android.material.snackbar.Snackbar;
|
||||||
import com.livefront.bridge.Bridge;
|
import com.livefront.bridge.Bridge;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONException;
|
import org.json.JSONException;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
@ -350,6 +351,12 @@ public class RPANActivity extends AppCompatActivity {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
EventBus.getDefault().unregister(this);
|
||||||
|
}
|
||||||
|
|
||||||
private void shareLink(String link) {
|
private void shareLink(String link) {
|
||||||
try {
|
try {
|
||||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||||
|
@ -293,6 +293,12 @@ public class TrendingActivity extends BaseActivity {
|
|||||||
outState.putParcelableArrayList(TRENDING_SEARCHES_STATE, trendingSearches);
|
outState.putParcelableArrayList(TRENDING_SEARCHES_STATE, trendingSearches);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onDestroy() {
|
||||||
|
super.onDestroy();
|
||||||
|
EventBus.getDefault().unregister(this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected SharedPreferences getDefaultSharedPreferences() {
|
protected SharedPreferences getDefaultSharedPreferences() {
|
||||||
return mSharedPreferences;
|
return mSharedPreferences;
|
||||||
|
Loading…
Reference in New Issue
Block a user