Skip to content

Commit

Permalink
Fix swift lint closure_end_indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
levieggertcru committed Jul 15, 2024
1 parent b12ef1c commit 31600e9
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ struct FeaturedLessonsView: View {
geometry: geometry,
cardTappedClosure: {

lessonTappedClosure?(featuredLesson)
})
lessonTappedClosure?(featuredLesson)
}
)
}
}
.padding([.top], lessonCardSpacing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct OpenTutorialBannerView: View {
.font(FontLibrary.sfProTextRegular.font(size: 17))
.onTapGesture {
openTutorialTappedClosure?()
}
}

Image(ImageCatalog.openTutorialArrow.name)
.resizable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ struct LessonEvaluationView: View {
buttonSize: closeButtonSize,
tapped: {
viewModel.closeTapped()
})
}
)
.padding([.top], closeButtonTop)
.padding([.trailing], 5)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ struct LessonsView: View {
geometry: geometry,
cardTappedClosure: {

viewModel.lessonCardTapped(lessonListItem: lessonListItem)
})
viewModel.lessonCardTapped(lessonListItem: lessonListItem)
}
)
}
}
.padding([.top], lessonCardSpacing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ class MobileContentRendererNavigation {
localizationServices: appDiContainer.dataLayer.getLocalizationServices(),
closeTappedClosure: { [weak self] in
self?.dismissToolTraining()
})
}
)

let view = ToolTrainingView(viewModel: viewModel)

Expand Down

0 comments on commit 31600e9

Please sign in to comment.