mirror of https://github.com/M66B/FairEmail.git
Always enable swipe refresh folders
This commit is contained in:
parent
75774daa20
commit
66b4942f41
|
@ -149,7 +149,6 @@ public class FragmentMessages extends FragmentBase {
|
||||||
private boolean outbox = false;
|
private boolean outbox = false;
|
||||||
private boolean connected;
|
private boolean connected;
|
||||||
private String searching = null;
|
private String searching = null;
|
||||||
private boolean refresh = false;
|
|
||||||
private boolean manual = false;
|
private boolean manual = false;
|
||||||
private Integer lastUnseen = null;
|
private Integer lastUnseen = null;
|
||||||
|
|
||||||
|
@ -533,7 +532,7 @@ public class FragmentMessages extends FragmentBase {
|
||||||
addBackPressedListener(onBackPressedListener);
|
addBackPressedListener(onBackPressedListener);
|
||||||
|
|
||||||
// Initialize
|
// Initialize
|
||||||
swipeRefresh.setEnabled(false);
|
swipeRefresh.setEnabled(pull);
|
||||||
tvNoEmail.setVisibility(View.GONE);
|
tvNoEmail.setVisibility(View.GONE);
|
||||||
seekBar.setEnabled(false);
|
seekBar.setEnabled(false);
|
||||||
seekBar.setVisibility(View.GONE);
|
seekBar.setVisibility(View.GONE);
|
||||||
|
@ -636,7 +635,7 @@ public class FragmentMessages extends FragmentBase {
|
||||||
fabMore.show();
|
fabMore.show();
|
||||||
} else {
|
} else {
|
||||||
fabMore.hide();
|
fabMore.hide();
|
||||||
swipeRefresh.setEnabled(pull && refresh);
|
swipeRefresh.setEnabled(pull);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -947,7 +946,7 @@ public class FragmentMessages extends FragmentBase {
|
||||||
@Override
|
@Override
|
||||||
public void onSelectedChanged(@Nullable RecyclerView.ViewHolder viewHolder, int actionState) {
|
public void onSelectedChanged(@Nullable RecyclerView.ViewHolder viewHolder, int actionState) {
|
||||||
super.onSelectedChanged(viewHolder, actionState);
|
super.onSelectedChanged(viewHolder, actionState);
|
||||||
swipeRefresh.setEnabled(pull && refresh && actionState != ItemTouchHelper.ACTION_STATE_SWIPE);
|
swipeRefresh.setEnabled(pull && actionState != ItemTouchHelper.ACTION_STATE_SWIPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -2262,13 +2261,10 @@ public class FragmentMessages extends FragmentBase {
|
||||||
|
|
||||||
// Get state
|
// Get state
|
||||||
int unseen = 0;
|
int unseen = 0;
|
||||||
boolean sync = false;
|
|
||||||
boolean errors = false;
|
boolean errors = false;
|
||||||
boolean refreshing = false;
|
boolean refreshing = false;
|
||||||
for (TupleFolderEx folder : folders) {
|
for (TupleFolderEx folder : folders) {
|
||||||
unseen += folder.unseen;
|
unseen += folder.unseen;
|
||||||
if (folder.synchronize)
|
|
||||||
sync = true;
|
|
||||||
if (folder.error != null)
|
if (folder.error != null)
|
||||||
errors = true;
|
errors = true;
|
||||||
if (folder.sync_state != null &&
|
if (folder.sync_state != null &&
|
||||||
|
@ -2305,8 +2301,6 @@ public class FragmentMessages extends FragmentBase {
|
||||||
lastUnseen = unseen;
|
lastUnseen = unseen;
|
||||||
}
|
}
|
||||||
|
|
||||||
refresh = sync;
|
|
||||||
swipeRefresh.setEnabled(pull && refresh);
|
|
||||||
swipeRefresh.setRefreshing(refreshing);
|
swipeRefresh.setRefreshing(refreshing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue