mirror of https://github.com/M66B/FairEmail.git
Favorite folders per account
This commit is contained in:
parent
efc76a1c63
commit
d029728c96
|
@ -199,11 +199,12 @@ public interface DaoFolder {
|
|||
LiveData<List<TupleFolderUnified>> liveUnified();
|
||||
|
||||
@Query("SELECT * FROM folder" +
|
||||
" WHERE selected_count > 0" +
|
||||
" WHERE account = :account" +
|
||||
" AND selected_count > 0" +
|
||||
" AND NOT folder.id IN (:disabled)" +
|
||||
" ORDER BY selected_count DESC, selected_last DESC" +
|
||||
" LIMIT :count")
|
||||
List<EntityFolder> getFavoriteFolders(int count, long[] disabled);
|
||||
List<EntityFolder> getFavoriteFolders(long account, int count, long[] disabled);
|
||||
|
||||
@Query("UPDATE folder" +
|
||||
" SET selected_last = :last, selected_count = selected_count + 1" +
|
||||
|
|
|
@ -283,7 +283,7 @@ public class FragmentDialogFolder extends FragmentDialogBase {
|
|||
|
||||
Data data = new Data();
|
||||
data.folders = db.folder().getFoldersEx(account);
|
||||
data.favorites = db.folder().getFavoriteFolders(3, disabled);
|
||||
data.favorites = db.folder().getFavoriteFolders(account, 3, disabled);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue