mirror of https://github.com/M66B/FairEmail.git
Small improvements
This commit is contained in:
parent
538525440c
commit
21bb3af518
|
@ -109,6 +109,9 @@ public class ActivityWidget extends ActivityBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onExecuted(Bundle args, List<EntityAccount> accounts) {
|
protected void onExecuted(Bundle args, List<EntityAccount> accounts) {
|
||||||
|
if (accounts == null)
|
||||||
|
accounts = new ArrayList<>();
|
||||||
|
|
||||||
EntityAccount all = new EntityAccount();
|
EntityAccount all = new EntityAccount();
|
||||||
all.id = -1L;
|
all.id = -1L;
|
||||||
all.name = getString(R.string.title_widget_account_all);
|
all.name = getString(R.string.title_widget_account_all);
|
||||||
|
|
|
@ -139,13 +139,16 @@ public class ActivityWidgetUnified extends ActivityBase {
|
||||||
|
|
||||||
DB db = DB.getInstance(context);
|
DB db = DB.getInstance(context);
|
||||||
List<TupleFolderEx> folders = db.folder().getFoldersEx(account);
|
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));
|
Collections.sort(folders, folders.get(0).getComparator(context));
|
||||||
return folders;
|
return folders;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onExecuted(Bundle args, List<TupleFolderEx> folders) {
|
protected void onExecuted(Bundle args, List<TupleFolderEx> folders) {
|
||||||
|
if (folders == null)
|
||||||
|
folders = new ArrayList<>();
|
||||||
|
|
||||||
TupleFolderEx unified = new TupleFolderEx();
|
TupleFolderEx unified = new TupleFolderEx();
|
||||||
unified.id = -1L;
|
unified.id = -1L;
|
||||||
unified.name = getString(R.string.title_widget_folder_unified);
|
unified.name = getString(R.string.title_widget_folder_unified);
|
||||||
|
|
Loading…
Reference in New Issue