Skip to content

Commit

Permalink
Linting Fixes Pt. 12
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Kribs committed Sep 23, 2023
1 parent eff1155 commit 382f608
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 27 deletions.
8 changes: 4 additions & 4 deletions Shared/Components/AlphaPicker/AlphaPickerButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ extension AlphaPickerView {
}
}
}
)
{
) {
Text(String(letter))
.font(letterFont)
.frame(width: letterFrame, height: letterFrame)
Expand All @@ -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,
Expand Down
30 changes: 13 additions & 17 deletions Swiftfin/Views/LibraryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ 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()
.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)
Expand Down Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions Swiftfin/Views/SettingsView/CustomizeViewsSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 382f608

Please sign in to comment.