UI geohash notifications (#325)

* location name in notifications

* remove tests

* panic nostr

* mentions with hashes, otherwise none

* fix timestamps

* parse geohashes in messages

* works

* fix country name

* mention notifications work
This commit is contained in:
callebtc
2025-08-28 17:47:47 +02:00
committed by GitHub
parent 3ea2aed9a4
commit 550520795f
12 changed files with 393 additions and 34 deletions
@@ -21,7 +21,6 @@ class MessageManager(private val state: ChatState) {
fun addMessage(message: BitchatMessage) {
val currentMessages = state.getMessagesValue().toMutableList()
currentMessages.add(message)
currentMessages.sortBy { it.timestamp }
state.setMessages(currentMessages)
}
@@ -39,7 +38,6 @@ class MessageManager(private val state: ChatState) {
val channelMessageList = currentChannelMessages[channel]?.toMutableList() ?: mutableListOf()
channelMessageList.add(message)
channelMessageList.sortBy { it.timestamp }
currentChannelMessages[channel] = channelMessageList
state.setChannelMessages(currentChannelMessages)
@@ -83,7 +81,6 @@ class MessageManager(private val state: ChatState) {
val chatMessages = currentPrivateChats[peerID]?.toMutableList() ?: mutableListOf()
chatMessages.add(message)
chatMessages.sortBy { it.timestamp }
currentPrivateChats[peerID] = chatMessages
state.setPrivateChats(currentPrivateChats)
@@ -103,7 +100,6 @@ class MessageManager(private val state: ChatState) {
}
val chatMessages = currentPrivateChats[peerID]?.toMutableList() ?: mutableListOf()
chatMessages.add(message)
chatMessages.sortBy { it.timestamp }
currentPrivateChats[peerID] = chatMessages
state.setPrivateChats(currentPrivateChats)
}