forked from mirrors/Fedilab
Fix issue 558 - App doesn't remember position on profiles/fav/bookmarks etc.
This commit is contained in:
parent
ef24d7586b
commit
bd5fccf2db
1 changed files with 4 additions and 2 deletions
|
@ -175,6 +175,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
|
||||||
private boolean rememberPosition;
|
private boolean rememberPosition;
|
||||||
private String publicTrendsDomain;
|
private String publicTrendsDomain;
|
||||||
private int lockForResumeCall;
|
private int lockForResumeCall;
|
||||||
|
private boolean isNotPinnedTimeline;
|
||||||
|
|
||||||
//Allow to recreate data when detaching/attaching fragment
|
//Allow to recreate data when detaching/attaching fragment
|
||||||
public void recreate() {
|
public void recreate() {
|
||||||
|
@ -213,10 +214,10 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
|
||||||
router(null);
|
router(null);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (timelineType == Timeline.TimeLineEnum.ACCOUNT_TIMELINE && lockForResumeCall == 0) {
|
if (isNotPinnedTimeline && lockForResumeCall == 0) {
|
||||||
router(null);
|
router(null);
|
||||||
lockForResumeCall++;
|
lockForResumeCall++;
|
||||||
} else if (timelineType != Timeline.TimeLineEnum.ACCOUNT_TIMELINE) {
|
} else if (!isNotPinnedTimeline) {
|
||||||
router(null);
|
router(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -321,6 +322,7 @@ public class FragmentMastodonTimeline extends Fragment implements StatusAdapter.
|
||||||
}
|
}
|
||||||
publicTrendsDomain = getArguments().getString(Helper.ARG_REMOTE_INSTANCE_STRING, null);
|
publicTrendsDomain = getArguments().getString(Helper.ARG_REMOTE_INSTANCE_STRING, null);
|
||||||
isViewInitialized = getArguments().getBoolean(Helper.ARG_INITIALIZE_VIEW, true);
|
isViewInitialized = getArguments().getBoolean(Helper.ARG_INITIALIZE_VIEW, true);
|
||||||
|
isNotPinnedTimeline = isViewInitialized;
|
||||||
tagTimeline = (TagTimeline) getArguments().getSerializable(Helper.ARG_TAG_TIMELINE);
|
tagTimeline = (TagTimeline) getArguments().getSerializable(Helper.ARG_TAG_TIMELINE);
|
||||||
accountTimeline = (Account) getArguments().getSerializable(Helper.ARG_ACCOUNT);
|
accountTimeline = (Account) getArguments().getSerializable(Helper.ARG_ACCOUNT);
|
||||||
exclude_replies = !getArguments().getBoolean(Helper.ARG_SHOW_REPLIES, true);
|
exclude_replies = !getArguments().getBoolean(Helper.ARG_SHOW_REPLIES, true);
|
||||||
|
|
Loading…
Reference in a new issue