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 {
|
interface Callback {
|
||||||
void accountFetched(AdminAccounts adminAccounts);
|
void accountFetched(AdminAccounts adminAccounts);
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,16 +204,6 @@ public class FragmentAdminReport extends Fragment {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDestroyView() {
|
|
||||||
if (binding != null) {
|
|
||||||
binding.recyclerView.setAdapter(null);
|
|
||||||
}
|
|
||||||
statusAdapter = null;
|
|
||||||
binding = null;
|
|
||||||
super.onDestroyView();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Refresh status in list
|
* Refresh status in list
|
||||||
|
|
|
@ -44,10 +44,4 @@ public class FragmentLoginJoin extends Fragment {
|
||||||
|
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDestroyView() {
|
|
||||||
super.onDestroyView();
|
|
||||||
binding = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -233,12 +233,6 @@ public class FragmentLoginMain extends Fragment {
|
||||||
popupMenu.show();
|
popupMenu.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDestroyView() {
|
|
||||||
super.onDestroyView();
|
|
||||||
binding = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void retrievesClientId(String instance) {
|
private void retrievesClientId(String instance) {
|
||||||
if (!instance.startsWith("http://") && !instance.startsWith("https://")) {
|
if (!instance.startsWith("http://") && !instance.startsWith("https://")) {
|
||||||
instance = "https://" + instance;
|
instance = "https://" + instance;
|
||||||
|
|
|
@ -132,10 +132,4 @@ public class FragmentLoginPickInstanceMastodon extends Fragment implements Insta
|
||||||
args, null, FragmentLoginRegisterMastodon.class.getName());
|
args, null, FragmentLoginRegisterMastodon.class.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDestroyView() {
|
|
||||||
super.onDestroyView();
|
|
||||||
binding = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -189,10 +189,4 @@ public class FragmentLoginRegisterMastodon extends Fragment {
|
||||||
});
|
});
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onDestroyView() {
|
|
||||||
super.onDestroyView();
|
|
||||||
binding = null;
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -263,14 +263,4 @@ public class FragmentMastodonAccount extends Fragment {
|
||||||
flagLoading = true;
|
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);
|
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
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
binding.recyclerView.setAdapter(null);
|
|
||||||
statusAdapter = null;
|
|
||||||
binding = null;
|
|
||||||
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,11 +152,4 @@ public class FragmentMastodonConversation extends Fragment {
|
||||||
binding.recyclerView.scrollToPosition(0);
|
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();
|
}).start();
|
||||||
}
|
}
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
binding.recyclerView.setAdapter(null);
|
|
||||||
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
||||||
notificationAdapter = null;
|
|
||||||
binding = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -117,11 +117,4 @@ public class FragmentMastodonTag extends Fragment {
|
||||||
binding.recyclerView.setAdapter(tagAdapter);
|
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();
|
}).start();
|
||||||
}
|
}
|
||||||
storeMarker();
|
storeMarker();
|
||||||
if (binding != null) {
|
|
||||||
binding.recyclerView.setAdapter(null);
|
|
||||||
}
|
|
||||||
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
|
||||||
}
|
}
|
||||||
statusAdapter = null;
|
LocalBroadcastManager.getInstance(requireActivity()).unregisterReceiver(receive_action);
|
||||||
binding = null;
|
|
||||||
super.onDestroyView();
|
super.onDestroyView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void storeMarker() {
|
private void storeMarker() {
|
||||||
if (timelineType == Timeline.TimeLineEnum.HOME && mLayoutManager != null) {
|
if (timelineType == Timeline.TimeLineEnum.HOME && mLayoutManager != null) {
|
||||||
int position = mLayoutManager.findFirstVisibleItemPosition();
|
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