Use 'Save' in profile renaming

Drop 'Done' label (unused).
This commit is contained in:
Davide De Rosa 2022-04-20 08:49:19 +02:00
parent dbc007b184
commit fff391702d
2 changed files with 5 additions and 7 deletions

View File

@ -304,10 +304,10 @@ extension View {
Text(L10n.Global.Strings.save) Text(L10n.Global.Strings.save)
} }
func themeDoneButtonLabel() -> some View { // func themeDoneButtonLabel() -> some View {
// themeCheckmarkImage.asSystemImage //// themeCheckmarkImage.asSystemImage
Text(L10n.Global.Strings.ok) // Text(L10n.Global.Strings.ok)
} // }
func themeTextPicker<T: Hashable>(_ title: String, selection: Binding<T>, values: [T], description: @escaping (T) -> String) -> some View { func themeTextPicker<T: Hashable>(_ title: String, selection: Binding<T>, values: [T], description: @escaping (T) -> String) -> some View {
StyledPicker(title: title, selection: selection, values: values) { StyledPicker(title: title, selection: selection, values: values) {

View File

@ -57,9 +57,7 @@ extension ProfileView {
.toolbar { .toolbar {
themeCloseItem(presentationMode: presentationMode) themeCloseItem(presentationMode: presentationMode)
ToolbarItem(placement: .primaryAction) { ToolbarItem(placement: .primaryAction) {
Button(action: commitRenaming) { Button(action: commitRenaming, label: themeSaveButtonLabel)
themeDoneButtonLabel()
}
} }
}.alert(isPresented: $isOverwritingExistingProfile, content: alertOverwriteExistingProfile) }.alert(isPresented: $isOverwritingExistingProfile, content: alertOverwriteExistingProfile)
} }