mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 13:47:05 +02:00
Experiment: quick switch unified folders
This commit is contained in:
@@ -100,7 +100,7 @@ public interface DaoFolder {
|
||||
" GROUP BY folder.id")
|
||||
LiveData<List<TupleFolderEx>> liveFolders(Long account, boolean primary);
|
||||
|
||||
@Query("SELECT folder.*" +
|
||||
final String queryUnified = "SELECT folder.*" +
|
||||
", account.id AS accountId, account.pop AS accountProtocol, account.`order` AS accountOrder" +
|
||||
", account.name AS accountName, account.category AS accountCategory, account.color AS accountColor" +
|
||||
", account.state AS accountState, account.error AS accountError" +
|
||||
@@ -117,9 +117,14 @@ public interface DaoFolder {
|
||||
" LEFT JOIN operation ON operation.folder = folder.id" +
|
||||
" WHERE account.`synchronize`" +
|
||||
" AND ((:type IS NULL AND folder.unified) OR folder.type = :type)" +
|
||||
" GROUP BY folder.id")
|
||||
" GROUP BY folder.id";
|
||||
|
||||
@Query(queryUnified)
|
||||
LiveData<List<TupleFolderEx>> liveUnified(String type);
|
||||
|
||||
@Query(queryUnified)
|
||||
List<TupleFolderEx> getUnified(String type);
|
||||
|
||||
@Query("SELECT folder.account, folder.id AS folder, unified, sync_state" +
|
||||
" FROM folder" +
|
||||
" JOIN account ON account.id = folder.account" +
|
||||
|
||||
Reference in New Issue
Block a user