mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Use Compound ListRow instead of Compound form styles. (#1484)
* Adopt ListRow Component. * Update snapshots. To check in future PR: - Pseudo Bug Report Attach Screenshot label - Bug Report screenshot padding (Use ListRow .custom?) - De-bold Analytics & Notification Settings footer links - Inline picker alignment perhaps? * Changelog * Update Compound. * Use the label on the login screen.
This commit is contained in:
+9
-10
@@ -14,6 +14,7 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import Compound
|
||||
import SwiftUI
|
||||
|
||||
struct AnalyticsSettingsScreen: View {
|
||||
@@ -23,25 +24,23 @@ struct AnalyticsSettingsScreen: View {
|
||||
Form {
|
||||
analyticsSection
|
||||
}
|
||||
.compoundForm()
|
||||
.compoundList()
|
||||
.navigationTitle(L10n.commonAnalytics)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
}
|
||||
|
||||
var analyticsSection: some View {
|
||||
Section {
|
||||
Toggle(isOn: $context.enableAnalytics) {
|
||||
Label(L10n.screenAnalyticsSettingsShareData, systemImage: "chart.bar")
|
||||
}
|
||||
.toggleStyle(.compoundForm)
|
||||
.onChange(of: context.enableAnalytics) { _ in
|
||||
context.send(viewAction: .toggleAnalytics)
|
||||
}
|
||||
ListRow(label: .default(title: L10n.screenAnalyticsSettingsShareData,
|
||||
systemIcon: .chartBar),
|
||||
kind: .toggle($context.enableAnalytics))
|
||||
.onChange(of: context.enableAnalytics) { _ in
|
||||
context.send(viewAction: .toggleAnalytics)
|
||||
}
|
||||
} footer: {
|
||||
Text(context.viewState.strings.sectionFooter)
|
||||
.compoundFormSectionFooter()
|
||||
.compoundListSectionFooter()
|
||||
}
|
||||
.compoundFormSection()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user