5720: Remove useless color, fix some issue with AvatarImage border

This commit is contained in:
MaximeE
2022-03-24 11:00:29 +01:00
parent ce0893bb37
commit 8e6ae3a667
14 changed files with 44 additions and 65 deletions
@@ -91,8 +91,8 @@ struct LocationSharingView: View {
LocationSharingOptionButton(text: VectorL10n.locationSharingStaticShareTitle) {
context.send(viewAction: .share)
} buttonIcon: {
AvatarImage(avatarData: context.viewState.userAvatarData, size: nil)
.shapedBorder(color: theme.displayUserColor(for: context.viewState.userAvatarData.matrixItemId), borderWidth: 3, shape: Circle())
AvatarImage(avatarData: context.viewState.userAvatarData, size: .medium)
.border()
}
.disabled(!context.viewState.shareButtonEnabled)
// Hide for now until live location sharing is finished
@@ -101,6 +101,7 @@ struct LocationSharingView: View {
// TODO: - Start live location sharing
} buttonIcon: {
Image(uiImage: Asset.Images.locationLiveIcon.image)
.resizable()
}
.disabled(!context.viewState.shareButtonEnabled)
}
@@ -109,6 +110,7 @@ struct LocationSharingView: View {
// TODO: - Pin drop sharing action
} buttonIcon: {
Image(uiImage: Asset.Images.locationPinIcon.image)
.resizable()
}
.disabled(!context.viewState.shareButtonEnabled)
}
@@ -131,6 +133,9 @@ struct LocationSharingView: View {
struct LocationSharingView_Previews: PreviewProvider {
static let stateRenderer = MockLocationSharingScreenState.stateRenderer
static var previews: some View {
stateRenderer.screenGroup()
Group {
stateRenderer.screenGroup().theme(.light).preferredColorScheme(.light)
stateRenderer.screenGroup().theme(.dark).preferredColorScheme(.dark)
}
}
}