Always sort conversation thread on time

This commit is contained in:
M66B 2018-12-15 09:11:47 +01:00
parent 627ce9e7a0
commit 7cc10f740d
2 changed files with 3 additions and 7 deletions

View File

@ -133,12 +133,8 @@ public interface DaoMessage {
" AND message.thread = :thread" +
" AND (:id IS NULL OR message.id = :id)" +
" AND (NOT message.ui_hide OR :debug)" +
" ORDER BY CASE" +
" WHEN 'unread' = :sort THEN NOT message.ui_seen" +
" WHEN 'starred' = :sort THEN message.ui_flagged" +
" ELSE 0" +
" END DESC, message.received DESC")
DataSource.Factory<Integer, TupleMessageEx> pagedThread(long account, String thread, Long id, String sort, boolean debug);
" ORDER BY message.received DESC")
DataSource.Factory<Integer, TupleMessageEx> pagedThread(long account, String thread, Long id, boolean debug);
@Query("SELECT COUNT(id)" +
" FROM message" +

View File

@ -1610,7 +1610,7 @@ public class FragmentMessages extends FragmentEx {
case THREAD:
messages = new LivePagedListBuilder<>(
db.message().pagedThread(account, thread, threading ? null : id, sort, debug), LOCAL_PAGE_SIZE).build();
db.message().pagedThread(account, thread, threading ? null : id, debug), LOCAL_PAGE_SIZE).build();
break;
}
} else {