mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Fix an issue for pull to refresh and home
This commit is contained in:
parent
ea984f0553
commit
f3719cef7e
2 changed files with 3 additions and 2 deletions
|
@ -257,6 +257,7 @@ public class FragmentLoginMain extends Fragment {
|
|||
Intent i = new Intent(requireActivity(), WebviewConnectActivity.class);
|
||||
i.putExtra("login_url", redirectUrl);
|
||||
startActivity(i);
|
||||
requireActivity().finish();
|
||||
} else {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
|
|
@ -429,7 +429,7 @@ public class FragmentMastodonTimeline extends Fragment {
|
|||
|
||||
new Thread(() -> {
|
||||
QuickLoad quickLoad = new QuickLoad(requireActivity()).getSavedValue(timelineType, ident);
|
||||
if (direction == null && quickLoad != null && quickLoad.statuses != null && quickLoad.statuses.size() > 0) {
|
||||
if (!binding.swipeContainer.isRefreshing() && direction == null && quickLoad != null && quickLoad.statuses != null && quickLoad.statuses.size() > 0) {
|
||||
Statuses statuses = new Statuses();
|
||||
statuses.statuses = quickLoad.statuses;
|
||||
statuses.pagination = new Pagination();
|
||||
|
@ -590,7 +590,7 @@ public class FragmentMastodonTimeline extends Fragment {
|
|||
fetchMarker = true;
|
||||
}
|
||||
//We search for marker only once - It should not be fetched again when pull to refresh
|
||||
if (fetchMarker) {
|
||||
if (fetchMarker && !binding.swipeContainer.isRefreshing()) {
|
||||
//Search for last position
|
||||
timelinesVM.getMarker(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, markers).observe(getViewLifecycleOwner(), marker -> {
|
||||
if (marker != null) {
|
||||
|
|
Loading…
Reference in a new issue