forked from mirrors/Fedilab
		
	Some fixes
This commit is contained in:
		
							parent
							
								
									425d19f2d6
								
							
						
					
					
						commit
						eb1be4f514
					
				
					 6 changed files with 3 additions and 26 deletions
				
			
		| 
						 | 
					@ -168,10 +168,4 @@ public class ContextActivity extends BaseActivity {
 | 
				
			||||||
        return true;
 | 
					        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
 | 
					    @Override
 | 
				
			||||||
    public void onAllDeleted() {
 | 
					    public void onAllDeleted() {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -294,7 +294,6 @@ public class MediaActivity extends BaseActivity implements OnDownloadInterface {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void onDestroy() {
 | 
					    public void onDestroy() {
 | 
				
			||||||
        binding = null;
 | 
					 | 
				
			||||||
        unregisterReceiver(onDownloadComplete);
 | 
					        unregisterReceiver(onDownloadComplete);
 | 
				
			||||||
        super.onDestroy();
 | 
					        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
 | 
					    @Override
 | 
				
			||||||
    public boolean onOptionsItemSelected(MenuItem item) {
 | 
					    public boolean onOptionsItemSelected(MenuItem item) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -122,7 +122,7 @@ public class FragmentMedia extends Fragment {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        binding.mediaPicture.setVisibility(View.VISIBLE);
 | 
					        binding.mediaPicture.setVisibility(View.VISIBLE);
 | 
				
			||||||
        binding.mediaPicture.setTransitionName(attachment.url);
 | 
					        binding.mediaPicture.setTransitionName(attachment.url);
 | 
				
			||||||
        if (Helper.isValidContextForGlide(requireActivity())) {
 | 
					        if (Helper.isValidContextForGlide(requireActivity()) && isAdded()) {
 | 
				
			||||||
            Glide.with(requireActivity())
 | 
					            Glide.with(requireActivity())
 | 
				
			||||||
                    .asBitmap()
 | 
					                    .asBitmap()
 | 
				
			||||||
                    .dontTransform()
 | 
					                    .dontTransform()
 | 
				
			||||||
| 
						 | 
					@ -142,7 +142,7 @@ public class FragmentMedia extends Fragment {
 | 
				
			||||||
                                    binding.mediaPicture.setVisibility(View.VISIBLE);
 | 
					                                    binding.mediaPicture.setVisibility(View.VISIBLE);
 | 
				
			||||||
                                    binding.pbarInf.setIndeterminate(true);
 | 
					                                    binding.pbarInf.setIndeterminate(true);
 | 
				
			||||||
                                    binding.loader.setVisibility(View.VISIBLE);
 | 
					                                    binding.loader.setVisibility(View.VISIBLE);
 | 
				
			||||||
                                    if (Helper.isValidContextForGlide(requireActivity())) {
 | 
					                                    if (Helper.isValidContextForGlide(requireActivity()) && isAdded()) {
 | 
				
			||||||
                                        Glide.with(requireActivity())
 | 
					                                        Glide.with(requireActivity())
 | 
				
			||||||
                                                .asBitmap()
 | 
					                                                .asBitmap()
 | 
				
			||||||
                                                .dontTransform()
 | 
					                                                .dontTransform()
 | 
				
			||||||
| 
						 | 
					@ -312,7 +312,6 @@ public class FragmentMedia extends Fragment {
 | 
				
			||||||
            timer.cancel();
 | 
					            timer.cancel();
 | 
				
			||||||
            timer = null;
 | 
					            timer = null;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        binding = null;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -494,8 +494,8 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }).start();
 | 
					            }).start();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        super.onDestroyView();
 | 
					 | 
				
			||||||
        LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
 | 
					        LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
 | 
				
			||||||
 | 
					        super.onDestroyView();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue