mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-22 14:47:29 +00:00
Possible fix for Tmp detached view error. Fixes austinhuang0131/barinsta#1200
This commit is contained in:
parent
3cc4f7b7bc
commit
1c5bdb1cca
@ -96,7 +96,7 @@ public class DirectMessageInboxFragment extends Fragment implements SwipeRefresh
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("UnsafeExperimentalUsageError")
|
||||
@SuppressLint({"UnsafeExperimentalUsageError", "UnsafeOptInUsageError"})
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
@ -176,7 +176,7 @@ public class DirectMessageInboxFragment extends Fragment implements SwipeRefresh
|
||||
if (inboxAdapter == null) return;
|
||||
inboxAdapter.submitList(list, () -> {
|
||||
if (!scrollToTop) return;
|
||||
binding.inboxList.smoothScrollToPosition(0);
|
||||
binding.inboxList.post(() -> binding.inboxList.smoothScrollToPosition(0));
|
||||
scrollToTop = false;
|
||||
});
|
||||
};
|
||||
@ -204,7 +204,7 @@ public class DirectMessageInboxFragment extends Fragment implements SwipeRefresh
|
||||
viewModel.getPendingRequestsTotal().observe(getViewLifecycleOwner(), this::attachPendingRequestsBadge);
|
||||
}
|
||||
|
||||
@SuppressLint("UnsafeExperimentalUsageError")
|
||||
@SuppressLint({"UnsafeExperimentalUsageError", "UnsafeOptInUsageError"})
|
||||
private void attachPendingRequestsBadge(@Nullable final Integer count) {
|
||||
if (pendingRequestsMenuItem == null) {
|
||||
final Handler handler = new Handler();
|
||||
|
Loading…
Reference in New Issue
Block a user