mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-25 05:27:42 +00:00
Fix crash when trying to create new group story.
Adds INNER JOIN to threads table to allow access to date in ORDER BY
This commit is contained in:
committed by
Greyson Parrelli
parent
27e1bc0854
commit
df695f7611
@@ -396,6 +396,7 @@ class GroupTable(context: Context?, databaseHelper: SignalDatabase?) : DatabaseT
|
||||
val query = getGroupQueryWhereStatement(groupQuery.searchQuery, groupQuery.includeInactive, !groupQuery.includeV1, !groupQuery.includeMms)
|
||||
val sql = """
|
||||
$JOINED_GROUP_SELECT
|
||||
INNER JOIN ${ThreadTable.TABLE_NAME} ON ${ThreadTable.TABLE_NAME}.${ThreadTable.RECIPIENT_ID} = $TABLE_NAME.$RECIPIENT_ID
|
||||
WHERE ${query.where}
|
||||
GROUP BY $TABLE_NAME.$GROUP_ID
|
||||
ORDER BY ${ThreadTable.TABLE_NAME}.${ThreadTable.DATE} DESC
|
||||
|
||||
Reference in New Issue
Block a user