feat: Enhance account handling and message delivery status updates; improve UI feedback for saved messages
This commit is contained in:
@@ -549,6 +549,7 @@ interface DialogDao {
|
||||
COALESCE(
|
||||
(SELECT delivered FROM messages
|
||||
WHERE account = :account
|
||||
AND from_me = 1
|
||||
AND ((from_public_key = :opponentKey AND to_public_key = :account)
|
||||
OR (from_public_key = :account AND to_public_key = :opponentKey))
|
||||
ORDER BY timestamp DESC LIMIT 1),
|
||||
@@ -557,6 +558,7 @@ interface DialogDao {
|
||||
COALESCE(
|
||||
(SELECT read FROM messages
|
||||
WHERE account = :account
|
||||
AND from_me = 1
|
||||
AND ((from_public_key = :opponentKey AND to_public_key = :account)
|
||||
OR (from_public_key = :account AND to_public_key = :opponentKey))
|
||||
ORDER BY timestamp DESC LIMIT 1),
|
||||
@@ -639,22 +641,8 @@ interface DialogDao {
|
||||
) AS verified,
|
||||
1 AS i_have_sent,
|
||||
1 AS last_message_from_me,
|
||||
COALESCE(
|
||||
(SELECT delivered FROM messages
|
||||
WHERE account = :account
|
||||
AND from_public_key = :account
|
||||
AND to_public_key = :account
|
||||
ORDER BY timestamp DESC LIMIT 1),
|
||||
0
|
||||
) AS last_message_delivered,
|
||||
COALESCE(
|
||||
(SELECT read FROM messages
|
||||
WHERE account = :account
|
||||
AND from_public_key = :account
|
||||
AND to_public_key = :account
|
||||
ORDER BY timestamp DESC LIMIT 1),
|
||||
0
|
||||
) AS last_message_read
|
||||
1 AS last_message_delivered,
|
||||
1 AS last_message_read
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM messages
|
||||
WHERE account = :account
|
||||
|
||||
Reference in New Issue
Block a user