Show send errors in message lists

This commit is contained in:
M66B
2021-07-03 15:13:20 +02:00
parent fe07b6f954
commit db2128dcd3
3 changed files with 50 additions and 10 deletions

View File

@@ -245,11 +245,12 @@ public interface DaoMessage {
boolean filter_archive,
boolean ascending, boolean debug);
@Query("SELECT COUNT(*) FROM message" +
@Query("SELECT COUNT(*) AS pending, SUM(message.error IS NOT NULL) AS errors" +
" FROM message" +
" JOIN folder_view AS folder ON folder.id = message.folder" +
" WHERE " + is_outbox +
" AND NOT ui_snoozed IS NULL")
LiveData<Integer> liveOutboxPending();
" AND (NOT message.ui_snoozed IS NULL OR message.error IS NOT NULL)")
LiveData<TupleOutboxStats> liveOutboxPending();
@Query("SELECT account.name AS accountName" +
", COUNT(message.id) AS count" +