diff --git a/Shared/Components/AlphaPicker/AlphaPickerButton.swift b/Shared/Components/AlphaPicker/AlphaPickerButton.swift index 01173c8dc..73442e21a 100644 --- a/Shared/Components/AlphaPicker/AlphaPickerButton.swift +++ b/Shared/Components/AlphaPicker/AlphaPickerButton.swift @@ -59,8 +59,7 @@ extension AlphaPickerView { } } } - ) - { + ) { Text(String(letter)) .font(letterFont) .frame(width: letterFrame, height: letterFrame) @@ -79,8 +78,9 @@ extension AlphaPickerView { } extension AlphaPickerView.AlphaPickerButton { - init(letter: Character, letterFont: Font, letterFrame: Double, - letterPadding: Double, letterHighlight: Double, activated: Bool, + init(letter: Character, letterFont: Font, + letterFrame: Double, letterPadding: Double, + letterHighlight: Double, activated: Bool, viewModel: FilterViewModel) { self.init( letter: letter, diff --git a/Swiftfin/Views/LibraryView.swift b/Swiftfin/Views/LibraryView.swift index 48044cc8a..fb321e144 100644 --- a/Swiftfin/Views/LibraryView.swift +++ b/Swiftfin/Views/LibraryView.swift @@ -40,8 +40,7 @@ struct LibraryView: View { private var noResultsView: some View { if alphaPickerOrientation == .disabled { L10n.noResults.text - } - else if alphaPickerOrientation == .right { + } else if alphaPickerOrientation == .right { HStack(spacing: 0) { L10n.noResults.text .ignoresSafeArea() @@ -49,8 +48,7 @@ struct LibraryView: View { AlphaPickerView(viewModel: viewModel.filterViewModel) .frame(width: 30) } - } - else if alphaPickerOrientation == .left { + } else if alphaPickerOrientation == .left { HStack(spacing: 0) { AlphaPickerView(viewModel: viewModel.filterViewModel) .frame(width: 30) @@ -83,20 +81,18 @@ struct LibraryView: View { baseItemOnSelect(item) } .ignoresSafeArea() - } - else if alphaPickerOrientation == .right { - HStack(spacing: 0) { - PagingLibraryView(viewModel: viewModel) - .onSelect { item in - baseItemOnSelect(item) - } - .ignoresSafeArea() - .frame(maxWidth: .infinity) - AlphaPickerView(viewModel: viewModel.filterViewModel) - .frame(width: 30) - } + } else if alphaPickerOrientation == .right { + HStack(spacing: 0) { + PagingLibraryView(viewModel: viewModel) + .onSelect { item in + baseItemOnSelect(item) + } + .ignoresSafeArea() + .frame(maxWidth: .infinity) + AlphaPickerView(viewModel: viewModel.filterViewModel) + .frame(width: 30) } - else if alphaPickerOrientation == .left { + } else if alphaPickerOrientation == .left { HStack(spacing: 0) { AlphaPickerView(viewModel: viewModel.filterViewModel) .frame(width: 30) diff --git a/Swiftfin/Views/SettingsView/CustomizeViewsSettings.swift b/Swiftfin/Views/SettingsView/CustomizeViewsSettings.swift index cf60bfc09..64348b3ae 100644 --- a/Swiftfin/Views/SettingsView/CustomizeViewsSettings.swift +++ b/Swiftfin/Views/SettingsView/CustomizeViewsSettings.swift @@ -91,14 +91,14 @@ struct CustomizeViewsSettings: View { EnumPicker(title: L10n.alphaPickerTitle, selection: $alphaPickerSelection) ChevronButton(title: L10n.library) - .onSelect { - router.route(to: \.filterDrawerButtonSelector, $libraryFilterDrawerButtons) - } + .onSelect { + router.route(to: \.filterDrawerButtonSelector, $libraryFilterDrawerButtons) + } ChevronButton(title: L10n.search) - .onSelect { - router.route(to: \.filterDrawerButtonSelector, $searchFilterDrawerButtons) - } + .onSelect { + router.route(to: \.filterDrawerButtonSelector, $searchFilterDrawerButtons) + } } header: { L10n.filters.text