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:
parent
27e1bc0854
commit
df695f7611
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue