diff --git a/Course/Course/Presentation/Outline/CourseVertical/CourseVerticalView.swift b/Course/Course/Presentation/Outline/CourseVertical/CourseVerticalView.swift index 18db60009..9acc0166d 100644 --- a/Course/Course/Presentation/Outline/CourseVertical/CourseVerticalView.swift +++ b/Course/Course/Presentation/Outline/CourseVertical/CourseVerticalView.swift @@ -41,7 +41,6 @@ public struct CourseVerticalView: View { // MARK: - Lessons list ForEach(viewModel.verticals, id: \.id) { vertical in if let index = viewModel.verticals.firstIndex(where: {$0.id == vertical.id}) { - HStack { Button(action: { let vertical = viewModel.verticals[index] if let block = vertical.childs.first { @@ -63,6 +62,7 @@ public struct CourseVerticalView: View { ) } }, label: { + HStack { Group { if vertical.completion == 1 { CoreAssets.finished.swiftUIImage @@ -81,15 +81,17 @@ public struct CourseVerticalView: View { .multilineTextAlignment(.leading) .frame(maxWidth: .infinity, alignment: .leading) }.foregroundColor(Theme.Colors.textPrimary) - }).accessibilityElement(children: .ignore) - .accessibilityLabel(vertical.displayName) Spacer() Image(systemName: "chevron.right") - .flipsForRightToLeftLayoutDirection(true) + .flipsForRightToLeftLayoutDirection(true) .padding(.vertical, 8) } + .contentShape(Rectangle()) + }) + .accessibilityElement(children: .ignore) + .accessibilityLabel(vertical.displayName) .padding(.horizontal, 36) - .padding(.vertical, 14) + .padding(.vertical, 14) if index != viewModel.verticals.count - 1 { Divider() .frame(height: 1) diff --git a/Course/Course/Presentation/Subviews/CustomDisclosureGroup.swift b/Course/Course/Presentation/Subviews/CustomDisclosureGroup.swift index 13ab0ecc2..4efc03974 100644 --- a/Course/Course/Presentation/Subviews/CustomDisclosureGroup.swift +++ b/Course/Course/Presentation/Subviews/CustomDisclosureGroup.swift @@ -222,40 +222,40 @@ private struct SequentialRowView: View { var body: some View { VStack(alignment: .leading) { - HStack { - Button( - action: { - guard let courseVertical = sequential.childs.first else { return } - guard let block = courseVertical.childs.first else { - viewModel.router.showGatedContentError(url: courseVertical.webUrl) - return - } - - viewModel.trackSequentialClicked(sequential) - if viewModel.config.uiComponents.courseDropDownNavigationEnabled { - viewModel.router.showCourseUnit( - courseName: viewModel.courseStructure?.displayName ?? "", - blockId: block.id, - courseID: viewModel.courseStructure?.id ?? "", - verticalIndex: 0, - chapters: course.childs, - chapterIndex: chapterIndex, - sequentialIndex: sequentialIndex, - showVideoNavigation: false, - courseVideoStructure: nil - ) - } else { - viewModel.router.showCourseVerticalView( - courseID: viewModel.courseStructure?.id ?? "", - courseName: viewModel.courseStructure?.displayName ?? "", - title: sequential.displayName, - chapters: course.childs, - chapterIndex: chapterIndex, - sequentialIndex: sequentialIndex - ) - } - }, - label: { + Button( + action: { + guard let courseVertical = sequential.childs.first else { return } + guard let block = courseVertical.childs.first else { + viewModel.router.showGatedContentError(url: courseVertical.webUrl) + return + } + + viewModel.trackSequentialClicked(sequential) + if viewModel.config.uiComponents.courseDropDownNavigationEnabled { + viewModel.router.showCourseUnit( + courseName: viewModel.courseStructure?.displayName ?? "", + blockId: block.id, + courseID: viewModel.courseStructure?.id ?? "", + verticalIndex: 0, + chapters: course.childs, + chapterIndex: chapterIndex, + sequentialIndex: sequentialIndex, + showVideoNavigation: false, + courseVideoStructure: nil + ) + } else { + viewModel.router.showCourseVerticalView( + courseID: viewModel.courseStructure?.id ?? "", + courseName: viewModel.courseStructure?.displayName ?? "", + title: sequential.displayName, + chapters: course.childs, + chapterIndex: chapterIndex, + sequentialIndex: sequentialIndex + ) + } + }, + label: { + HStack { VStack(alignment: .leading) { HStack { if sequential.completion == 1 { @@ -286,14 +286,15 @@ private struct SequentialRowView: View { .foregroundColor(Theme.Colors.textPrimary) .accessibilityElement(children: .ignore) .accessibilityLabel(sequential.displayName) + Spacer() + if sequential.due != nil { + CoreAssets.chevronRight.swiftUIImage + .foregroundColor(Theme.Colors.textPrimary) + } } - ) - Spacer() - if sequential.due != nil { - CoreAssets.chevronRight.swiftUIImage - .foregroundColor(Theme.Colors.textPrimary) + .contentShape(Rectangle()) } - } + ) .padding(.vertical, 4) } } diff --git a/Discovery/Discovery/Presentation/NativeDiscovery/SearchView.swift b/Discovery/Discovery/Presentation/NativeDiscovery/SearchView.swift index 7141730c6..25d5613eb 100644 --- a/Discovery/Discovery/Presentation/NativeDiscovery/SearchView.swift +++ b/Discovery/Discovery/Presentation/NativeDiscovery/SearchView.swift @@ -57,8 +57,11 @@ public struct SearchView: View { viewModel.isSearchActive = editing } ).focused($focused) - .onAppear { - self.focused = true + .onFirstAppear { + Task { @MainActor in + try? await Task.sleep(for: .seconds(0.5)) + self.focused = true + } } .foregroundColor(Theme.Colors.textInputTextColor) .font(Theme.Fonts.bodyLarge)