fixing bug to show my own icon in the convo bubble

This commit is contained in:
talksik
2022-01-01 19:18:39 -08:00
parent f497740c75
commit 398185dac0
3 changed files with 19 additions and 21 deletions
@@ -227,6 +227,8 @@ extension AuthSessionStore {
print("up to date user: \(realtimeUpdatedUser)")
self?.user = realtimeUpdatedUser
self?.objectWillChange.send()
self?.relevantUsersDict[currUserId!] = realtimeUpdatedUser
}
}
@@ -111,7 +111,7 @@ struct ConvoFooterView: View {
x:0,
y:self.convoVM.selectedConvoId == nil ? 150 : 0
)
.onReceive(self.convoVM.$selectedConvoId) {newConvoId in
.onChange(of: self.convoVM.selectedConvoId) {newConvoId in
// update meta data based on which convo was selected
// reset the selected options to start fresh
@@ -94,23 +94,19 @@ struct CircleGridView: View {
.shadow(color: Color.black.opacity(0.2), radius: 10, x: 0, y: 20)
}
Text("\(convoUsers.count)")
// top right number or people in convo
Circle()
.frame(width: 20, height: 20)
.foregroundColor(Color.green)
.font(.title2)
.padding(5)
.font(.caption)
.foregroundColor(Color.white)
.background(NirvanaColor.dimTeal)
.cornerRadius(100)
// ZStack(alignment: .bottom) {
// Color.clear
//
// Text("kev, sarth...")
// .foregroundColor(NirvanaColor.teal)
// .font(.caption)
// }
.overlay(
Text("\(convoUsers.count)")
.foregroundColor(Color.white)
.font(.caption2)
)
}
.scaleEffect(self.animateLiveConvos ? scale + 0.2 : scale)
.scaleEffect(scale)
.padding(scale * 5)
} // geometry reader
.offset(
@@ -137,11 +133,11 @@ struct CircleGridView: View {
}
}
.animation(
Animation.easeInOut(duration: self.convoVM.selectedConvoId == currConvo.id ? 2 : 4
).repeatForever(autoreverses: true),
value: self.animateLiveConvos
)
// .animation(
// Animation.easeInOut(duration: 4).repeatForever(autoreverses: true),
// value: self.animateLiveConvos
// )
.animation(Animation.spring())
}
// active friends