mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Merge pull request #791 from mpretty-cyro/feature/pin-note-to-self-in-share-extension
Update the share extension to always show 'Note to Self' first
This commit is contained in:
commit
e0f9be082a
1 changed files with 4 additions and 5 deletions
|
@ -1607,15 +1607,14 @@ public extension SessionThreadViewModel {
|
|||
\(SQL("\(thread[.variant]) != \(SessionThread.Variant.contact)")) OR
|
||||
\(SQL("\(thread[.id]) = \(userPublicKey)")) OR
|
||||
\(contact[.isApproved]) = true
|
||||
) AND (
|
||||
-- Only show the 'Note to Self' thread if it has an interaction
|
||||
\(SQL("\(thread[.id]) != \(userPublicKey)")) OR
|
||||
\(interaction[.id]) IS NOT NULL
|
||||
)
|
||||
-- Always show the 'Note to Self' thread when sharing
|
||||
OR \(SQL("\(thread[.id]) = \(userPublicKey)"))
|
||||
)
|
||||
|
||||
GROUP BY \(thread[.id])
|
||||
ORDER BY IFNULL(\(interaction[.timestampMs]), (\(thread[.creationDateTimestamp]) * 1000)) DESC
|
||||
-- 'Note to Self', then by most recent message
|
||||
ORDER BY \(SQL("\(thread[.id]) = \(userPublicKey)")) DESC, IFNULL(\(interaction[.timestampMs]), (\(thread[.creationDateTimestamp]) * 1000)) DESC
|
||||
"""
|
||||
|
||||
return request.adapted { db in
|
||||
|
|
Loading…
Reference in a new issue