feat: Enhance ProtocolManager logging and error handling; optimize emoji picker performance
This commit is contained in:
@@ -103,10 +103,17 @@ object ProtocolManager {
|
||||
addLog("🟢 Online status received: ${onlinePacket.publicKeysState.size} entries")
|
||||
|
||||
scope.launch {
|
||||
onlinePacket.publicKeysState.forEach { item ->
|
||||
val isOnline = item.state == OnlineState.ONLINE
|
||||
addLog(" ${item.publicKey.take(16)}... -> ${if (isOnline) "ONLINE" else "OFFLINE"}")
|
||||
messageRepository?.updateOnlineStatus(item.publicKey, isOnline)
|
||||
if (messageRepository == null) {
|
||||
addLog("❌ ERROR: messageRepository is NULL!")
|
||||
} else {
|
||||
addLog("✅ messageRepository is initialized")
|
||||
onlinePacket.publicKeysState.forEach { item ->
|
||||
val isOnline = item.state == OnlineState.ONLINE
|
||||
addLog(" ${item.publicKey.take(16)}... -> ${if (isOnline) "ONLINE" else "OFFLINE"}")
|
||||
addLog(" Calling updateOnlineStatus...")
|
||||
messageRepository?.updateOnlineStatus(item.publicKey, isOnline)
|
||||
addLog(" updateOnlineStatus called")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user