mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-25 17:45:12 +01:00
Sort pinned chats like chat list for shortcut list.
This commit is contained in:
committed by
jeffrey-signal
parent
5321f8124a
commit
d682de08d2
@@ -2151,7 +2151,7 @@ class ThreadTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTa
|
||||
|
||||
private fun createQuery(where: String, offset: Long, limit: Long, preferPinned: Boolean): String {
|
||||
val orderBy = if (preferPinned) {
|
||||
"$TABLE_NAME.$PINNED_ORDER DESC, $TABLE_NAME.$DATE DESC"
|
||||
"CASE WHEN $TABLE_NAME.$PINNED_ORDER IS NULL THEN 1 ELSE 0 END, $TABLE_NAME.$PINNED_ORDER ASC, $TABLE_NAME.$DATE DESC"
|
||||
} else {
|
||||
"$TABLE_NAME.$DATE DESC"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user