Address comments and cleanup version checks

This commit is contained in:
David Langley
2021-08-25 15:46:02 +01:00
parent bfd6bac416
commit 391a6ea6c5
11 changed files with 47 additions and 51 deletions
@@ -61,7 +61,7 @@ struct BorderedInputFieldStyle: TextFieldStyle {
return Color(theme.colors.background)
}
private var borderWdith: CGFloat {
private var borderWidth: CGFloat {
return isEditing || isError ? 2 : 1.5
}
@@ -75,7 +75,7 @@ struct BorderedInputFieldStyle: TextFieldStyle {
.padding(.horizontal, 8)
.background(backgroundColor)
.clipShape(rect)
.overlay(rect.stroke(borderColor, lineWidth: borderWdith))
.overlay(rect.stroke(borderColor, lineWidth: borderWidth))
}
}
@@ -23,7 +23,7 @@ struct DefaultNotificationSettings: View {
var body: some View {
NotificationSettings(viewModel: viewModel)
.navigationBarTitle(VectorL10n.settingsDefault)
.navigationBarTitle(VectorL10n.settingsDefault)
}
}
@@ -34,7 +34,7 @@ struct DefaultNotifications_Previews: PreviewProvider {
DefaultNotificationSettings(
viewModel: NotificationSettingsViewModel(
notificationSettingsService: MockNotificationSettingsService.example,
ruleIds: NotificationSettingsScreen.defaultNotificaitons.pushRules
ruleIds: NotificationSettingsScreen.defaultNotifications.pushRules
)
)
.navigationBarTitleDisplayMode(.inline)
@@ -26,7 +26,7 @@ struct MentionsAndKeywordNotificationSettings: View {
header: FormSectionHeader(text: VectorL10n.settingsYourKeywords),
footer: FormSectionFooter(text: VectorL10n.settingsMentionsAndKeywordsEncryptionNotice)
) {
Keywords(viewModel: viewModel)
NotificationSettingsKeywords(viewModel: viewModel)
}
}
var body: some View {
@@ -20,7 +20,7 @@ import SwiftUI
Renders the keywords input, driven by 'NotificationSettingsViewModel'.
*/
@available(iOS 14.0, *)
struct Keywords: View {
struct NotificationSettingsKeywords: View {
@ObservedObject var viewModel: NotificationSettingsViewModel
var body: some View {
ChipsInput(
@@ -41,6 +41,6 @@ struct Keywords_Previews: PreviewProvider {
ruleIds: NotificationSettingsScreen.mentionsAndKeywords.pushRules
)
static var previews: some View {
Keywords(viewModel: viewModel)
NotificationSettingsKeywords(viewModel: viewModel)
}
}
@@ -22,7 +22,7 @@ struct OtherNotificationSettings: View {
var body: some View {
NotificationSettings(viewModel: viewModel)
.navigationTitle(VectorL10n.settingsOther)
.navigationTitle(VectorL10n.settingsOther)
}
}