mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-27 10:17:18 +00:00
Small improvements
This commit is contained in:
parent
538525440c
commit
21bb3af518
2 changed files with 7 additions and 1 deletions
|
@ -109,6 +109,9 @@ public class ActivityWidget extends ActivityBase {
|
|||
|
||||
@Override
|
||||
protected void onExecuted(Bundle args, List<EntityAccount> accounts) {
|
||||
if (accounts == null)
|
||||
accounts = new ArrayList<>();
|
||||
|
||||
EntityAccount all = new EntityAccount();
|
||||
all.id = -1L;
|
||||
all.name = getString(R.string.title_widget_account_all);
|
||||
|
|
|
@ -139,13 +139,16 @@ public class ActivityWidgetUnified extends ActivityBase {
|
|||
|
||||
DB db = DB.getInstance(context);
|
||||
List<TupleFolderEx> folders = db.folder().getFoldersEx(account);
|
||||
if (folders.size() > 0)
|
||||
if (folders != null && folders.size() > 0)
|
||||
Collections.sort(folders, folders.get(0).getComparator(context));
|
||||
return folders;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExecuted(Bundle args, List<TupleFolderEx> folders) {
|
||||
if (folders == null)
|
||||
folders = new ArrayList<>();
|
||||
|
||||
TupleFolderEx unified = new TupleFolderEx();
|
||||
unified.id = -1L;
|
||||
unified.name = getString(R.string.title_widget_folder_unified);
|
||||
|
|
Loading…
Reference in a new issue