cealning up sent message ux

This commit is contained in:
talksik
2022-01-04 10:11:12 -08:00
parent db33f05679
commit 4115a76cce
3 changed files with 40 additions and 33 deletions
@@ -34,6 +34,7 @@ struct CircleGridView: View {
count: totalColumns)
@Binding var selectedFriendIndex: String?
@State var lastPersonIdSentMessageTo: String?
private let big:CGFloat = 1
private let medium:CGFloat = 0.9
@@ -157,7 +158,8 @@ struct CircleGridView: View {
if self.haveNewMessageFromFriend(friendDbId: friendId) {
ProgressBarView(progress: self.selectedFriendIndex == friendId ? self.innerCircleVM.messagesListeningProgress : Float(1), color: Color.orange)
} else if self.selectedFriendIndex == friendId {
}
else if friendId == self.lastPersonIdSentMessageTo { // show that I sent a message to the last person I sent a message to
ProgressBarView(progress: self.innerCircleVM.toast == InnerCircleViewModel.Toast.clipSent ? Float(1) : Float(0), color: NirvanaColor.dimTeal)
}
@@ -252,7 +254,8 @@ struct CircleGridView: View {
// stop recording
print("stopping recording")
// self.selectedFriendIndex = nil
self.lastPersonIdSentMessageTo = self.selectedFriendIndex
self.selectedFriendIndex = nil
self.innerCircleVM.stopRecording(sender: self.authSessionStore.user!, receiver: self.authSessionStore.relevantUsersDict[friendId]!)
@@ -360,7 +363,6 @@ struct CircleGridView: View {
} //lazygrid // TODO: add padding based on if we are on any cornering item to allow the bubble to enlargen
.padding(.trailing, Self.size / 2 + Self.spacingBetweenColumns / 2) // because of the offset of last column
.padding(.top, Self.size / 2 + Self.spacingBetweenRows / 2) // because we are going under the nav bar
// .id(UUID())
}// scrollview
.onAppear {
// scrolling to first person in grid