mirror of
https://codeberg.org/tom79/Fedilab
synced 2025-02-02 04:16:56 +01:00
Fix issue #299 - Crashes with pinned timelines
This commit is contained in:
parent
b7d966a873
commit
2180da64b7
@ -577,9 +577,7 @@ public class PinnedTimelineHelper {
|
||||
}
|
||||
fragTransaction1.detach(fragmentMastodonTimeline).commit();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable(Helper.ARG_REMOTE_INSTANCE, pinned);
|
||||
bundle.putString("instanceType", remoteInstance.type.getValue());
|
||||
bundle.putString("timelineId", remoteInstance.id);
|
||||
bundle.putSerializable(Helper.ARG_REMOTE_INSTANCE, pinned.pinnedTimelines.get(offSetPosition));
|
||||
bundle.putSerializable(Helper.ARG_TIMELINE_TYPE, Timeline.TimeLineEnum.REMOTE);
|
||||
fragmentMastodonTimeline.setArguments(bundle);
|
||||
FragmentTransaction fragTransaction2 = activity.getSupportFragmentManager().beginTransaction();
|
||||
@ -623,10 +621,7 @@ public class PinnedTimelineHelper {
|
||||
currentFilter[0] = remoteInstance.filteredWith;
|
||||
fragTransaction1.detach(fragmentMastodonTimeline).commit();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable(Helper.ARG_REMOTE_INSTANCE, pinned);
|
||||
bundle.putString("instanceType", remoteInstance.type.getValue());
|
||||
bundle.putString("timelineId", remoteInstance.id);
|
||||
bundle.putString("currentfilter", remoteInstance.filteredWith);
|
||||
bundle.putSerializable(Helper.ARG_REMOTE_INSTANCE, pinned.pinnedTimelines.get(offSetPosition));
|
||||
bundle.putSerializable(Helper.ARG_TIMELINE_TYPE, Timeline.TimeLineEnum.REMOTE);
|
||||
fragmentMastodonTimeline.setArguments(bundle);
|
||||
FragmentTransaction fragTransaction2 = activity.getSupportFragmentManager().beginTransaction();
|
||||
@ -698,12 +693,7 @@ public class PinnedTimelineHelper {
|
||||
return;
|
||||
fragTransaction1.detach(fragmentMastodonTimeline).commit();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putSerializable(Helper.ARG_REMOTE_INSTANCE, pinned);
|
||||
bundle.putString("instanceType", remoteInstance.type.getValue());
|
||||
bundle.putString("timelineId", remoteInstance.id);
|
||||
if (currentFilter[0] != null) {
|
||||
bundle.putString("currentfilter", remoteInstance.filteredWith);
|
||||
}
|
||||
bundle.putSerializable(Helper.ARG_REMOTE_INSTANCE, pinned.pinnedTimelines.get(offSetPosition));
|
||||
bundle.putSerializable(Helper.ARG_TIMELINE_TYPE, Timeline.TimeLineEnum.REMOTE);
|
||||
fragmentMastodonTimeline.setArguments(bundle);
|
||||
FragmentTransaction fragTransaction2 = activity.getSupportFragmentManager().beginTransaction();
|
||||
|
@ -108,7 +108,7 @@ public class FedilabPageAdapter extends FragmentStatePagerAdapter {
|
||||
} else if (pinnedTimeline.type == Timeline.TimeLineEnum.TAG) {
|
||||
bundle.putSerializable(Helper.ARG_TAG_TIMELINE, pinnedTimeline.tagTimeline);
|
||||
} else if (pinnedTimeline.type == Timeline.TimeLineEnum.REMOTE) {
|
||||
bundle.putSerializable(Helper.ARG_REMOTE_INSTANCE, pinned);
|
||||
bundle.putSerializable(Helper.ARG_REMOTE_INSTANCE, pinnedTimeline);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user