Fixed sorting on size

This commit is contained in:
M66B 2020-01-25 13:48:21 +01:00
parent 08365a7f1d
commit 23bd903965
1 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ public interface DaoMessage {
" WHEN 'starred' = :sort THEN COUNT(message.id) - SUM(1 - message.ui_flagged) = 0" +
" WHEN 'sender' = :sort THEN LOWER(message.sender)" +
" WHEN 'subject' = :sort THEN LOWER(message.subject)" +
" WHEN 'size' = :sort THEN -SUM(message.size)" +
" WHEN 'size' = :sort THEN -SUM(message.total)" +
" WHEN 'snoozed' = :sort THEN SUM(CASE WHEN message.ui_snoozed IS NULL THEN 0 ELSE 1 END) = 0" +
" ELSE 0" +
" END, CASE WHEN :ascending THEN message.received ELSE -message.received END")
@ -128,7 +128,7 @@ public interface DaoMessage {
" WHEN 'starred' = :sort THEN COUNT(message.id) - SUM(1 - message.ui_flagged) = 0" +
" WHEN 'sender' = :sort THEN LOWER(message.sender)" +
" WHEN 'subject' = :sort THEN LOWER(message.subject)" +
" WHEN 'size' = :sort THEN -SUM(message.size)" +
" WHEN 'size' = :sort THEN -SUM(message.total)" +
" WHEN 'snoozed' = :sort THEN SUM(CASE WHEN message.ui_snoozed IS NULL THEN 0 ELSE 1 END) = 0" +
" ELSE 0" +
" END, CASE WHEN :ascending THEN message.received ELSE -message.received END")