mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 00:30:03 +02:00
Fix a crash with back button
This commit is contained in:
parent
227d2ef58b
commit
096dc6e98c
2 changed files with 5 additions and 2 deletions
|
@ -909,7 +909,10 @@ public class Helper {
|
|||
if (args != null) fragment.setArguments(args);
|
||||
ft = fragmentManager.beginTransaction();
|
||||
ft.add(containerViewId, fragment, tag);
|
||||
if (backStackName != null) ft.addToBackStack(backStackName);
|
||||
if (backStackName != null) {
|
||||
ft = fragmentManager.beginTransaction();
|
||||
ft.addToBackStack(backStackName);
|
||||
}
|
||||
if (!fragmentManager.isDestroyed()) {
|
||||
ft.commit();
|
||||
}
|
||||
|
|
|
@ -1259,7 +1259,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
|
|||
if (show_pinned) {
|
||||
//Fetch pinned statuses to display them at the top
|
||||
accountsVM.getAccountStatuses(currentInstance, MainActivity.currentToken, accountId, null, null, null, null, null, false, true, MastodonHelper.statusesPerCall(requireActivity()))
|
||||
.observe(getViewLifecycleOwner(), pinnedStatuses -> accountsVM.getAccountStatuses(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, accountTimeline.id, null, null, null, exclude_replies, exclude_reblogs, media_only, false, MastodonHelper.statusesPerCall(requireActivity()))
|
||||
.observe(getViewLifecycleOwner(), pinnedStatuses -> accountsVM.getAccountStatuses(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, accountId, null, null, null, exclude_replies, exclude_reblogs, media_only, false, MastodonHelper.statusesPerCall(requireActivity()))
|
||||
.observe(getViewLifecycleOwner(), otherStatuses -> {
|
||||
if (otherStatuses != null && otherStatuses.statuses != null && pinnedStatuses != null && pinnedStatuses.statuses != null) {
|
||||
for (Status status : pinnedStatuses.statuses) {
|
||||
|
|
Loading…
Reference in a new issue