Skip to content
Snippets Groups Projects
Commit bff4d59b authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

UI: update settings for location sharing

This patch makes the UI for selecting the location sharing time
more explicit.

Change-Id: I400f8eb2e3119479502acd0d29c8f58f4d743c0c
parent 38b62dcd
No related branches found
No related tags found
No related merge requests found
......@@ -90,31 +90,33 @@ struct LocationSharingSettingsView: View {
Text(L10n.GeneralSettings.limitLocationSharingDuration)
Spacer()
Text(model.locationSharingDurationString)
Image(systemName: "chevron.down")
}
.onTapGesture {
withAnimation(.spring(response: 0.3, dampingFraction: 0.9, blendDuration: 0.4)) {
showingDurationPicker = true
}
}
}
}
.navigationBarTitleDisplayMode(.inline)
.navigationTitle(L10n.GeneralSettings.locationSharing)
}
if showingDurationPicker {
Color.black.opacity(0.4)
Group {
Color.black.opacity(showingDurationPicker ? 0.4 : 0)
.edgesIgnoringSafeArea(.all)
.onTapGesture {
withAnimation {
showingDurationPicker = false
}
}
DurationPickerView(duration: $model.locationSharingDuration, isPresented: $showingDurationPicker)
.background(Color(UIColor.systemBackground))
.cornerRadius(12)
.shadow(radius: 5)
.transition(.move(edge: .bottom))
.animation(.easeInOut)
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment