adding player although not working, tryting to get it more realtime with updates and updating on chagne of messages and friends
This commit is contained in:
@@ -243,6 +243,8 @@ extension AuthSessionStore {
|
||||
self.friendMessagesDict[returnedUser!.id!] = []
|
||||
}
|
||||
|
||||
self.objectWillChange.send()
|
||||
|
||||
print("added this user to the array of users for user's circle\(returnedUser)")
|
||||
}
|
||||
}
|
||||
@@ -305,6 +307,8 @@ extension AuthSessionStore {
|
||||
} else {
|
||||
self.friendMessagesDict[currMessage!.senderId]?.append(currMessage!)
|
||||
}
|
||||
|
||||
self.objectWillChange.send()
|
||||
}
|
||||
return currMessage
|
||||
} catch {
|
||||
|
||||
@@ -133,11 +133,12 @@ struct CircleGridView: View {
|
||||
|
||||
// start playing if there are messages to listen to
|
||||
if AVPlayerItems.count > 0 {
|
||||
print("have message urls that we will start listening to")
|
||||
print("have message urls that we will start listening to\(AVPlayerItems)")
|
||||
|
||||
AVQueuePlayer(items: AVPlayerItems)
|
||||
let queuePlayer = AVQueuePlayer(items: AVPlayerItems)
|
||||
|
||||
queuePlayer.play()
|
||||
|
||||
player.play()
|
||||
|
||||
// update the listencount and firstlistentimestamp of those messages in firestore
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user