mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-26 10:45:21 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user