mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix fragment issue
This commit is contained in:
parent
f219b6ef24
commit
0c726d1c55
15 changed files with 2 additions and 100 deletions
|
@ -197,16 +197,6 @@ public class FragmentAdminAccount extends Fragment {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (binding != null) {
|
||||
binding.recyclerView.setAdapter(null);
|
||||
}
|
||||
adminAccountAdapter = null;
|
||||
binding = null;
|
||||
}
|
||||
|
||||
interface Callback {
|
||||
void accountFetched(AdminAccounts adminAccounts);
|
||||
}
|
||||
|
|
|
@ -204,16 +204,6 @@ public class FragmentAdminReport extends Fragment {
|
|||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
if (binding != null) {
|
||||
binding.recyclerView.setAdapter(null);
|
||||
}
|
||||
statusAdapter = null;
|
||||
binding = null;
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Refresh status in list
|
||||
|
|
|
@ -44,10 +44,4 @@ public class FragmentLoginJoin extends Fragment {
|
|||
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding = null;
|
||||
}
|
||||
}
|
|
@ -233,12 +233,6 @@ public class FragmentLoginMain extends Fragment {
|
|||
popupMenu.show();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding = null;
|
||||
}
|
||||
|
||||
private void retrievesClientId(String instance) {
|
||||
if (!instance.startsWith("http://") && !instance.startsWith("https://")) {
|
||||
instance = "https://" + instance;
|
||||
|
|
|
@ -132,10 +132,4 @@ public class FragmentLoginPickInstanceMastodon extends Fragment implements Insta
|
|||
args, null, FragmentLoginRegisterMastodon.class.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding = null;
|
||||
}
|
||||
}
|
|
@ -189,10 +189,4 @@ public class FragmentLoginRegisterMastodon extends Fragment {
|
|||
});
|
||||
return root;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding = null;
|
||||
}
|
||||
}
|
|
@ -263,14 +263,4 @@ public class FragmentMastodonAccount extends Fragment {
|
|||
flagLoading = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (binding != null) {
|
||||
binding.recyclerView.setAdapter(null);
|
||||
}
|
||||
accountAdapter = null;
|
||||
binding = null;
|
||||
}
|
||||
}
|
|
@ -110,12 +110,4 @@ public class FragmentMastodonAnnouncement extends Fragment {
|
|||
binding.recyclerView.scrollToPosition(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding.recyclerView.setAdapter(null);
|
||||
announcementAdapter = null;
|
||||
binding = null;
|
||||
}
|
||||
|
||||
}
|
|
@ -257,9 +257,6 @@ public class FragmentMastodonContext extends Fragment {
|
|||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
binding.recyclerView.setAdapter(null);
|
||||
statusAdapter = null;
|
||||
binding = null;
|
||||
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
|
|
@ -152,11 +152,4 @@ public class FragmentMastodonConversation extends Fragment {
|
|||
binding.recyclerView.scrollToPosition(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding.recyclerView.setAdapter(null);
|
||||
conversationAdapter = null;
|
||||
binding = null;
|
||||
}
|
||||
}
|
|
@ -489,10 +489,7 @@ public class FragmentMastodonNotification extends Fragment implements Notificati
|
|||
}).start();
|
||||
}
|
||||
super.onDestroyView();
|
||||
binding.recyclerView.setAdapter(null);
|
||||
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
||||
notificationAdapter = null;
|
||||
binding = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -117,11 +117,4 @@ public class FragmentMastodonTag extends Fragment {
|
|||
binding.recyclerView.setAdapter(tagAdapter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding.recyclerView.setAdapter(null);
|
||||
tagAdapter = null;
|
||||
binding = null;
|
||||
}
|
||||
}
|
|
@ -526,16 +526,12 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
|
|||
}).start();
|
||||
}
|
||||
storeMarker();
|
||||
if (binding != null) {
|
||||
binding.recyclerView.setAdapter(null);
|
||||
}
|
||||
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
||||
}
|
||||
statusAdapter = null;
|
||||
binding = null;
|
||||
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
|
||||
private void storeMarker() {
|
||||
if (timelineType == Timeline.TimeLineEnum.HOME && mLayoutManager != null) {
|
||||
int position = mLayoutManager.findFirstVisibleItemPosition();
|
||||
|
|
|
@ -258,10 +258,4 @@ public class FragmentNotificationContainer extends Fragment {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -78,10 +78,4 @@ public class FragmentProfileTimeline extends Fragment {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
binding = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue