fix: unregister ComposeFragment for events on its destruction

This commit is contained in:
LucasGGamerM
2023-06-11 18:06:11 -03:00
parent 986b9731a1
commit 1675c8ab79

View File

@@ -295,6 +295,7 @@ public class ComposeFragment extends MastodonToolbarFragment implements OnBackPr
@Override
public void onDestroy(){
super.onDestroy();
E.unregister(this);
for(DraftMediaAttachment att:attachments){
if(att.isUploadingOrProcessing())
att.cancelUpload();