Some fixes
This commit is contained in:
parent
425d19f2d6
commit
eb1be4f514
|
@ -168,10 +168,4 @@ public class ContextActivity extends BaseActivity {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
binding = null;
|
||||
currentFragment = null;
|
||||
}
|
||||
}
|
|
@ -205,12 +205,6 @@ public class DraftActivity extends BaseActivity implements StatusDraftAdapter.Dr
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
binding.lvStatus.setAdapter(null);
|
||||
binding = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAllDeleted() {
|
||||
|
|
|
@ -294,7 +294,6 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
|
|||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
binding = null;
|
||||
unregisterReceiver(onDownloadComplete);
|
||||
super.onDestroy();
|
||||
}
|
||||
|
|
|
@ -156,15 +156,6 @@ public class SettingsActivity extends BaseActivity {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
if (currentFragment != null) {
|
||||
currentFragment.onDestroy();
|
||||
}
|
||||
binding = null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
|
|
|
@ -122,7 +122,7 @@ public class FragmentMedia extends Fragment {
|
|||
|
||||
binding.mediaPicture.setVisibility(View.VISIBLE);
|
||||
binding.mediaPicture.setTransitionName(attachment.url);
|
||||
if (Helper.isValidContextForGlide(requireActivity())) {
|
||||
if (Helper.isValidContextForGlide(requireActivity()) && isAdded()) {
|
||||
Glide.with(requireActivity())
|
||||
.asBitmap()
|
||||
.dontTransform()
|
||||
|
@ -142,7 +142,7 @@ public class FragmentMedia extends Fragment {
|
|||
binding.mediaPicture.setVisibility(View.VISIBLE);
|
||||
binding.pbarInf.setIndeterminate(true);
|
||||
binding.loader.setVisibility(View.VISIBLE);
|
||||
if (Helper.isValidContextForGlide(requireActivity())) {
|
||||
if (Helper.isValidContextForGlide(requireActivity()) && isAdded()) {
|
||||
Glide.with(requireActivity())
|
||||
.asBitmap()
|
||||
.dontTransform()
|
||||
|
@ -312,7 +312,6 @@ public class FragmentMedia extends Fragment {
|
|||
timer.cancel();
|
||||
timer = null;
|
||||
}
|
||||
binding = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -494,8 +494,8 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
|
|||
}
|
||||
}).start();
|
||||
}
|
||||
super.onDestroyView();
|
||||
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue