mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
allow users to set live location minimum distance update
This commit is contained in:
+25
@@ -37,6 +37,7 @@ struct AdvancedSettingsScreen: View {
|
||||
|
||||
moderationAndSafetySection
|
||||
timelineMediaSection
|
||||
liveLocationSection
|
||||
}
|
||||
.compoundList()
|
||||
.navigationTitle(L10n.commonAdvancedSettings)
|
||||
@@ -84,6 +85,30 @@ struct AdvancedSettingsScreen: View {
|
||||
.compoundListSectionFooter()
|
||||
}
|
||||
}
|
||||
|
||||
private var liveLocationSection: some View {
|
||||
Section {
|
||||
ListRow(kind: .custom {
|
||||
Stepper(L10n.screenAdvancedSettingsLiveLocationUpdateDistance(context.liveLocationMinimumDistanceUpdate),
|
||||
value: $context.liveLocationMinimumDistanceUpdate, in: 1...100)
|
||||
.font(.compound.bodyLG)
|
||||
.foregroundStyle(.compound.textPrimary)
|
||||
.padding(.horizontal, ListRowPadding.horizontal)
|
||||
.padding(.vertical, ListRowPadding.vertical)
|
||||
})
|
||||
} header: {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(L10n.screenAdvancedSettingsLiveLocationSectionTitle)
|
||||
.compoundListSectionHeader()
|
||||
Text(L10n.screenAdvancedSettingsLiveLocationSectionDescription)
|
||||
.font(.compound.bodyMD)
|
||||
.foregroundStyle(.compound.textSecondary)
|
||||
}
|
||||
} footer: {
|
||||
Text(context.viewState.liveLocationUpdateFooterAttributedString)
|
||||
.compoundListSectionFooter()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extension AppAppearance {
|
||||
|
||||
Reference in New Issue
Block a user