copy text and fix notifications for DM

This commit is contained in:
callebtc
2025-07-13 23:42:58 +02:00
parent 2b63c7805e
commit 20cf8b59f8
3 changed files with 22 additions and 21 deletions
@@ -96,7 +96,7 @@ class NotificationManager(private val context: Context) {
*/
fun showPrivateMessageNotification(senderPeerID: String, senderNickname: String, messageContent: String) {
// Only show notifications if app is in background OR user is not viewing this specific chat
val shouldNotify = isAppInBackground || currentPrivateChatPeer != senderPeerID
val shouldNotify = isAppInBackground || (!isAppInBackground && currentPrivateChatPeer != senderPeerID)
if (!shouldNotify) {
Log.d(TAG, "Skipping notification - app in foreground and viewing chat with $senderNickname")