feat: add emoji reactions to message bubbles (#1421)

* Add tapback emojis to message bubbles

Added TapBackEmojiItem composable to display tapback emojis.
Included it in MessageItem composable for incoming messages.
Added a FlowRow to show tapback emojis below the message bubble.

* feat: Add EmojiPicker View

* feat: show emojis for local messages

* feat: Add emoji tapbacks to messages

This commit introduces the ability to send and receive emoji tapbacks for messages.

- Adds emoji and replyId fields to DataPacket.
- Adds emoji tapback support to the MeshService
- Modifies UIState to handle emojis in message lists.

* feat: store tapbacks in database

Store tapbacks in the database and display them in the message list.
- Add a new table to the database to store tapbacks.
- Add a new DAO method to insert and retrieve tapbacks.
- Update the message list UI to display tapbacks.

* refactor: relation db and other changes

---------

Co-authored-by: Andre K <andrekir@pm.me>
This commit is contained in:
James Rich 2024-12-03 05:57:35 -06:00 committed by GitHub
parent b3f4929cf4
commit 2234f5a713
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 1049 additions and 187 deletions

View file

@ -84,8 +84,8 @@ class PacketDaoTest {
}
packetDao = database.packetDao().apply {
generateTestPackets(42424243).forEach(::insert)
generateTestPackets(myNodeNum).forEach(::insert)
generateTestPackets(42424243).forEach { insert(it) }
generateTestPackets(myNodeNum).forEach { insert(it) }
}
}
@ -132,10 +132,10 @@ class PacketDaoTest {
val messages = packetDao.getMessagesFrom(contactKey).first()
assertEquals(SAMPLE_SIZE, messages.size)
val onlyFromContactKey = messages.all { it.contact_key == contactKey }
val onlyFromContactKey = messages.all { it.packet.contact_key == contactKey }
assertTrue(onlyFromContactKey)
val onlyMyNodeNum = messages.all { it.myNodeNum == myNodeNum }
val onlyMyNodeNum = messages.all { it.packet.myNodeNum == myNodeNum }
assertTrue(onlyMyNodeNum)
}
}