feat: Simplify animations across multiple screens by replacing slide transitions with fade animations for improved user experience
This commit is contained in:
@@ -106,7 +106,16 @@ data class DialogEntity(
|
||||
val verified: Int = 0, // Верифицирован
|
||||
|
||||
@ColumnInfo(name = "i_have_sent", defaultValue = "0")
|
||||
val iHaveSent: Int = 0 // Отправлял ли я сообщения в этот диалог (0/1)
|
||||
val iHaveSent: Int = 0, // Отправлял ли я сообщения в этот диалог (0/1)
|
||||
|
||||
@ColumnInfo(name = "last_message_from_me", defaultValue = "0")
|
||||
val lastMessageFromMe: Int = 0, // Последнее сообщение от меня (0/1)
|
||||
|
||||
@ColumnInfo(name = "last_message_delivered", defaultValue = "0")
|
||||
val lastMessageDelivered: Int = 0, // Статус доставки последнего сообщения (0=WAITING, 1=DELIVERED, 2=ERROR)
|
||||
|
||||
@ColumnInfo(name = "last_message_read", defaultValue = "0")
|
||||
val lastMessageRead: Int = 0 // Прочитано последнее сообщение (0/1)
|
||||
)
|
||||
|
||||
/**
|
||||
@@ -465,7 +474,10 @@ interface DialogDao {
|
||||
is_online,
|
||||
last_seen,
|
||||
verified,
|
||||
i_have_sent
|
||||
i_have_sent,
|
||||
last_message_from_me,
|
||||
last_message_delivered,
|
||||
last_message_read
|
||||
)
|
||||
SELECT
|
||||
:account AS account,
|
||||
@@ -525,7 +537,31 @@ interface DialogDao {
|
||||
(SELECT i_have_sent FROM dialogs WHERE account = :account AND opponent_key = :opponentKey),
|
||||
0
|
||||
)
|
||||
END AS i_have_sent
|
||||
END AS i_have_sent,
|
||||
COALESCE(
|
||||
(SELECT from_me FROM messages
|
||||
WHERE account = :account
|
||||
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),
|
||||
0
|
||||
) AS last_message_from_me,
|
||||
COALESCE(
|
||||
(SELECT delivered FROM messages
|
||||
WHERE account = :account
|
||||
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),
|
||||
0
|
||||
) AS last_message_delivered,
|
||||
COALESCE(
|
||||
(SELECT read FROM messages
|
||||
WHERE account = :account
|
||||
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),
|
||||
0
|
||||
) AS last_message_read
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM messages
|
||||
WHERE account = :account
|
||||
@@ -557,7 +593,10 @@ interface DialogDao {
|
||||
is_online,
|
||||
last_seen,
|
||||
verified,
|
||||
i_have_sent
|
||||
i_have_sent,
|
||||
last_message_from_me,
|
||||
last_message_delivered,
|
||||
last_message_read
|
||||
)
|
||||
SELECT
|
||||
:account AS account,
|
||||
@@ -598,7 +637,24 @@ interface DialogDao {
|
||||
(SELECT verified FROM dialogs WHERE account = :account AND opponent_key = :account),
|
||||
0
|
||||
) AS verified,
|
||||
1 AS i_have_sent
|
||||
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
|
||||
WHERE EXISTS (
|
||||
SELECT 1 FROM messages
|
||||
WHERE account = :account
|
||||
|
||||
Reference in New Issue
Block a user