diff --git a/godtools/App/Features/Favorites/Presentation/Favorites/FavoritesView.swift b/godtools/App/Features/Favorites/Presentation/Favorites/FavoritesView.swift index 8893e88bbd..7ce382c4b7 100644 --- a/godtools/App/Features/Favorites/Presentation/Favorites/FavoritesView.swift +++ b/godtools/App/Features/Favorites/Presentation/Favorites/FavoritesView.swift @@ -64,9 +64,10 @@ struct FavoritesView: View { geometry: geometry, contentHorizontalInsets: contentHorizontalInsets, lessonTappedClosure: { (featuredLesson: FeaturedLessonDomainModel) in - - viewModel.featuredLessonTapped(featuredLesson: featuredLesson) - }) + + viewModel.featuredLessonTapped(featuredLesson: featuredLesson) + } + ) .padding([.top], 30) YourFavoriteToolsView( diff --git a/godtools/App/Features/Favorites/Presentation/Favorites/Subviews/FeaturedLessons/FeaturedLessonsView.swift b/godtools/App/Features/Favorites/Presentation/Favorites/Subviews/FeaturedLessons/FeaturedLessonsView.swift index d96aad9177..c4fc28fac7 100644 --- a/godtools/App/Features/Favorites/Presentation/Favorites/Subviews/FeaturedLessons/FeaturedLessonsView.swift +++ b/godtools/App/Features/Favorites/Presentation/Favorites/Subviews/FeaturedLessons/FeaturedLessonsView.swift @@ -44,8 +44,9 @@ struct FeaturedLessonsView: View { geometry: geometry, cardTappedClosure: { - lessonTappedClosure?(featuredLesson) - }) + lessonTappedClosure?(featuredLesson) + } + ) } } .padding([.top], lessonCardSpacing) diff --git a/godtools/App/Features/Favorites/Presentation/Favorites/Subviews/OpenTutorialBanner/OpenTutorialBannerView.swift b/godtools/App/Features/Favorites/Presentation/Favorites/Subviews/OpenTutorialBanner/OpenTutorialBannerView.swift index a76cec7640..5fc3e34b45 100644 --- a/godtools/App/Features/Favorites/Presentation/Favorites/Subviews/OpenTutorialBanner/OpenTutorialBannerView.swift +++ b/godtools/App/Features/Favorites/Presentation/Favorites/Subviews/OpenTutorialBanner/OpenTutorialBannerView.swift @@ -38,7 +38,7 @@ struct OpenTutorialBannerView: View { .font(FontLibrary.sfProTextRegular.font(size: 17)) .onTapGesture { openTutorialTappedClosure?() - } + } Image(ImageCatalog.openTutorialArrow.name) .resizable() diff --git a/godtools/App/Features/LessonEvaluation/Presentation/LessonEvaluation/LessonEvaluationView.swift b/godtools/App/Features/LessonEvaluation/Presentation/LessonEvaluation/LessonEvaluationView.swift index b4338125bb..c1497cd78a 100644 --- a/godtools/App/Features/LessonEvaluation/Presentation/LessonEvaluation/LessonEvaluationView.swift +++ b/godtools/App/Features/LessonEvaluation/Presentation/LessonEvaluation/LessonEvaluationView.swift @@ -39,7 +39,8 @@ struct LessonEvaluationView: View { buttonSize: closeButtonSize, tapped: { viewModel.closeTapped() - }) + } + ) .padding([.top], closeButtonTop) .padding([.trailing], 5) } diff --git a/godtools/App/Features/Lessons/Presentation/Lessons/LessonsView.swift b/godtools/App/Features/Lessons/Presentation/Lessons/LessonsView.swift index ea592916a3..80b8cfe259 100644 --- a/godtools/App/Features/Lessons/Presentation/Lessons/LessonsView.swift +++ b/godtools/App/Features/Lessons/Presentation/Lessons/LessonsView.swift @@ -53,8 +53,9 @@ struct LessonsView: View { geometry: geometry, cardTappedClosure: { - viewModel.lessonCardTapped(lessonListItem: lessonListItem) - }) + viewModel.lessonCardTapped(lessonListItem: lessonListItem) + } + ) } } .padding([.top], lessonCardSpacing) diff --git a/godtools/App/Features/Menu/Domain/UseCases/GetUserActivityUseCase/GetUserActivityUseCase.swift b/godtools/App/Features/Menu/Domain/UseCases/GetUserActivityUseCase/GetUserActivityUseCase.swift index e3786b339a..b46b6980c8 100644 --- a/godtools/App/Features/Menu/Domain/UseCases/GetUserActivityUseCase/GetUserActivityUseCase.swift +++ b/godtools/App/Features/Menu/Domain/UseCases/GetUserActivityUseCase/GetUserActivityUseCase.swift @@ -30,15 +30,14 @@ class GetUserActivityUseCase { return userCounterRepository .getUserCountersChanged(reloadFromRemote: true) .flatMap { _ in - + let allUserCounters = self.getAllUserCounters() - + let userActivityDomainModel = self.getUserActivityDomainModel(from: allUserCounters, translatedInAppLanguage: appLanguage) - - return Just(userActivityDomainModel) - - } - .eraseToAnyPublisher() + + return Just(userActivityDomainModel) + } + .eraseToAnyPublisher() } private func getAllUserCounters() -> [UserCounterDomainModel] { diff --git a/godtools/App/Features/ToolDetails/Presentation/ToolDetails/ToolDetailsView.swift b/godtools/App/Features/ToolDetails/Presentation/ToolDetails/ToolDetailsView.swift index 773e1b4526..c13e0d39bf 100644 --- a/godtools/App/Features/ToolDetails/Presentation/ToolDetails/ToolDetailsView.swift +++ b/godtools/App/Features/ToolDetails/Presentation/ToolDetails/ToolDetailsView.swift @@ -42,50 +42,49 @@ struct ToolDetailsView: View { ToolDetailsMediaView(viewModel: viewModel, width: geometry.size.width) VStack(alignment: .center, spacing: 0) { - - ToolDetailsTitleHeaderView(viewModel: viewModel) + + ToolDetailsTitleHeaderView(viewModel: viewModel) .padding(EdgeInsets(top: 40, leading: contentInsets.leading, bottom: 0, trailing: contentInsets.trailing)) - - ToolDetailsPrimaryButtonsView(viewModel: viewModel, primaryButtonWidth: contentWidth) + + ToolDetailsPrimaryButtonsView(viewModel: viewModel, primaryButtonWidth: contentWidth) .padding(EdgeInsets(top: 16, leading: contentInsets.leading, bottom: 0, trailing: contentInsets.trailing)) - - SegmentControl(selectedIndex: $selectedSegmentIndex, segments: viewModel.segments, segmentTappedClosure: { (index: Int) in - - viewModel.segmentTapped(index: index) - }) - .padding(EdgeInsets(top: 50, leading: 0, bottom: 0, trailing: 0)) - } - .background(Rectangle() - .fill(Color.white) - .shadow(color: Color.black.opacity(0.3), radius: 4, x: 0, y: 1) - .mask(Rectangle().padding(.bottom, -8)) - ) - - Rectangle() - .frame(width: geometry.size.width, height: 20) - .foregroundColor(.clear) - - switch viewModel.selectedSegment { - - case .about: - ToolDetailsAboutView( + + SegmentControl(selectedIndex: $selectedSegmentIndex, segments: viewModel.segments, segmentTappedClosure: { (index: Int) in + viewModel.segmentTapped(index: index) + }) + .padding(EdgeInsets(top: 50, leading: 0, bottom: 0, trailing: 0)) + } + .background(Rectangle() + .fill(Color.white) + .shadow(color: Color.black.opacity(0.3), radius: 4, x: 0, y: 1) + .mask(Rectangle().padding(.bottom, -8)) + ) + + Rectangle() + .frame(width: geometry.size.width, height: 20) + .foregroundColor(.clear) + + switch viewModel.selectedSegment { + + case .about: + ToolDetailsAboutView( viewModel: viewModel, geometry: geometry - ) - - case .versions: - ToolDetailsVersionsView( + ) + + case .versions: + ToolDetailsVersionsView( viewModel: viewModel, geometry: geometry, toolVersionTappedClosure: { scrollViewReader.scrollTo(ToolDetailsView.scrollToTopViewId) } - ) - } - - Rectangle() - .frame(width: geometry.size.width, height: 20) - .foregroundColor(.clear) + ) + } + + Rectangle() + .frame(width: geometry.size.width, height: 20) + .foregroundColor(.clear) } .frame(width: geometry.size.width) } diff --git a/godtools/App/Services/Renderer/Navigation/MobileContentRendererNavigation.swift b/godtools/App/Services/Renderer/Navigation/MobileContentRendererNavigation.swift index aee33f8953..4928a9c15e 100644 --- a/godtools/App/Services/Renderer/Navigation/MobileContentRendererNavigation.swift +++ b/godtools/App/Services/Renderer/Navigation/MobileContentRendererNavigation.swift @@ -153,7 +153,8 @@ class MobileContentRendererNavigation { localizationServices: appDiContainer.dataLayer.getLocalizationServices(), closeTappedClosure: { [weak self] in self?.dismissToolTraining() - }) + } + ) let view = ToolTrainingView(viewModel: viewModel)