mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 02:05:19 +00:00
Fix compiler warning: use let for reference type array
BitchatMessage is a class, so modifying its properties through an array reference doesn't mutate the array itself. Changed var to let binding. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3155,7 +3155,7 @@ final class ChatViewModel: ObservableObject, BitchatDelegate, CommandContextProv
|
||||
let (foundPeerID, idx) = findMessageIndex(messageID: messageID, peerID: peerID) else { return }
|
||||
|
||||
// Explicitly unwrap and re-assign to ensure the @Published setter is called
|
||||
if var messages = privateChats[foundPeerID], idx < messages.count {
|
||||
if let messages = privateChats[foundPeerID], idx < messages.count {
|
||||
messages[idx].deliveryStatus = .read(by: name, at: Date())
|
||||
privateChats[foundPeerID] = messages
|
||||
privateChatManager.objectWillChange.send()
|
||||
|
||||
Reference in New Issue
Block a user