mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 04:35:57 +00:00
Show sync errors
This commit is contained in:
parent
5579237c2a
commit
e7f40d1b2f
2 changed files with 15 additions and 1 deletions
|
@ -1517,8 +1517,13 @@ public class FragmentMessages extends FragmentBase {
|
|||
folders = new ArrayList<>();
|
||||
|
||||
int unseen = 0;
|
||||
for (TupleFolderEx folder : folders)
|
||||
boolean errors = false;
|
||||
for (TupleFolderEx folder : folders) {
|
||||
unseen += folder.unseen;
|
||||
if (!TextUtils.isEmpty(folder.error))
|
||||
errors = true;
|
||||
}
|
||||
|
||||
String name = getString(R.string.title_folder_unified);
|
||||
if (unseen > 0)
|
||||
setSubtitle(getString(R.string.title_unseen_count, name, unseen));
|
||||
|
@ -1537,6 +1542,10 @@ public class FragmentMessages extends FragmentBase {
|
|||
rvMessage.scrollToPosition(0);
|
||||
}
|
||||
|
||||
if (errors &&
|
||||
!refreshing && swipeRefresh.isRefreshing())
|
||||
Snackbar.make(view, R.string.title_sync_errors, Snackbar.LENGTH_LONG).show();
|
||||
|
||||
swipeRefresh.setRefreshing(refreshing);
|
||||
}
|
||||
});
|
||||
|
@ -1569,6 +1578,10 @@ public class FragmentMessages extends FragmentBase {
|
|||
rvMessage.scrollToPosition(0);
|
||||
}
|
||||
|
||||
if (folder != null && !TextUtils.isEmpty(folder.error) &&
|
||||
!refreshing && swipeRefresh.isRefreshing())
|
||||
Snackbar.make(view, folder.error, Snackbar.LENGTH_LONG).show();
|
||||
|
||||
swipeRefresh.setRefreshing(refreshing);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -258,6 +258,7 @@
|
|||
<string name="title_no_uidplus">This provider does not support UIDPLUS</string>
|
||||
<string name="title_no_utf8">This provider does not support UTF-8</string>
|
||||
<string name="title_no_sync">Synchronization errors since %1$s</string>
|
||||
<string name="title_sync_errors">Synchronizing some folders failed</string>
|
||||
<string name="title_drafts_required">A drafts folder is required to send messages</string>
|
||||
<string name="title_account_delete">Delete this account permanently?</string>
|
||||
<string name="title_identity_delete">Delete this identity permanently?</string>
|
||||
|
|
Loading…
Reference in a new issue