From cf628da6812c09c4e2baa1c8ba41c3fe3e3e6620 Mon Sep 17 00:00:00 2001 From: talksik Date: Wed, 22 Dec 2021 01:55:55 -0800 Subject: [PATCH] like this alignment better, let's see if users call more with this sort of feature --- .../Views/InnerCircle/CircleFooterView.swift | 47 +++++++++---------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/nirvana-ios/Views/InnerCircle/CircleFooterView.swift b/nirvana-ios/Views/InnerCircle/CircleFooterView.swift index c15886e..8bc1f3e 100644 --- a/nirvana-ios/Views/InnerCircle/CircleFooterView.swift +++ b/nirvana-ios/Views/InnerCircle/CircleFooterView.swift @@ -26,6 +26,27 @@ struct CircleFooterView: View { HStack { if self.selectedFriend != nil && !self.convoRelativeTime.isEmpty && self.myTurn != nil { + // friend avatar + Image(self.selectedFriend!.avatar ?? "") + .resizable() + .scaledToFit() + .background(NirvanaColor.teal.opacity(0.1)) + .frame(width: 40, height: 40) + .clipShape(Circle()) + .padding(5) + + // meta data of convo + VStack (alignment: .trailing) { + Text(self.selectedFriend!.nickname ?? "") + .font(.footnote) + .foregroundColor(NirvanaColor.light) + Text(self.convoRelativeTime) + .font(.caption) + .foregroundColor(.gray) + } + + Spacer() + // call button Button { print("calling user now") @@ -44,33 +65,7 @@ struct CircleFooterView: View { .foregroundColor(NirvanaColor.teal) .padding() .font(.title2) - } - - Spacer() - - // meta data of convo - VStack (alignment: .trailing) { - Text(self.selectedFriend!.nickname ?? "") - .font(.footnote) - .foregroundColor(NirvanaColor.light) - Text(self.convoRelativeTime) - .font(.caption) - .foregroundColor(.gray) } - - Image(self.selectedFriend!.avatar ?? "") - .resizable() - .scaledToFit() - .background(NirvanaColor.teal.opacity(0.1)) - .frame(width: 40, height: 40) - .clipShape(Circle()) - .padding(5) - -// if self.myTurn! { -// Text("it's your turn") -// } else { -// Text("it's their turn") -// } } } .frame(maxWidth: .infinity, maxHeight: 60) // 60 is the height of the footer control big circle