From 1e62b123364201b238c94b4b31b8b0ff44c364a2 Mon Sep 17 00:00:00 2001 From: Rachael Skeath Date: Wed, 10 Jul 2024 20:03:33 -0400 Subject: [PATCH] change navBar title --- .../LessonFilterLanguageSelectionViewModel.swift | 5 ++--- .../Lessons/Presentation/Lessons/LessonsViewModel.swift | 2 +- godtools/Base.lproj/Localizable.strings | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/godtools/App/Features/LessonFilter/Presentation/LessonFilterLanguageSelectionView/LessonFilterLanguageSelectionViewModel.swift b/godtools/App/Features/LessonFilter/Presentation/LessonFilterLanguageSelectionView/LessonFilterLanguageSelectionViewModel.swift index e9c9e97c11..86f50d866f 100644 --- a/godtools/App/Features/LessonFilter/Presentation/LessonFilterLanguageSelectionView/LessonFilterLanguageSelectionViewModel.swift +++ b/godtools/App/Features/LessonFilter/Presentation/LessonFilterLanguageSelectionView/LessonFilterLanguageSelectionViewModel.swift @@ -11,6 +11,8 @@ import Combine class LessonFilterLanguageSelectionViewModel: ObservableObject { + private static var staticCancellables: Set = Set() + private let viewLessonFilterLanguagesUseCase: ViewLessonFilterLanguagesUseCase private let getUserLessonFiltersUseCase: GetUserLessonFiltersUseCase private let storeUserLessonFiltersUseCase: StoreUserLessonFiltersUseCase @@ -19,9 +21,7 @@ class LessonFilterLanguageSelectionViewModel: ObservableObject { private let getCurrentAppLanguageUseCase: GetCurrentAppLanguageUseCase private var cancellables: Set = Set() - private static var staticCancellables: Set = Set() private weak var flowDelegate: FlowDelegate? - private lazy var searchBarViewModel = SearchBarViewModel(getCurrentAppLanguageUseCase: getCurrentAppLanguageUseCase, viewSearchBarUseCase: viewSearchBarUseCase) @Published private var appLanguage: AppLanguageDomainModel = LanguageCodeDomainModel.english.rawValue @@ -119,5 +119,4 @@ extension LessonFilterLanguageSelectionViewModel { return searchBarViewModel } - } diff --git a/godtools/App/Features/Lessons/Presentation/Lessons/LessonsViewModel.swift b/godtools/App/Features/Lessons/Presentation/Lessons/LessonsViewModel.swift index 9d9a8bbfc9..095abee62e 100644 --- a/godtools/App/Features/Lessons/Presentation/Lessons/LessonsViewModel.swift +++ b/godtools/App/Features/Lessons/Presentation/Lessons/LessonsViewModel.swift @@ -82,7 +82,7 @@ class LessonsViewModel: ObservableObject { .receive(on: DispatchQueue.main) .sink { [weak self] userFilters in - self?.languageFilterButtonTitle = userFilters.languageFilter?.translatedName ?? userFilters.languageFilter?.languageName ?? "" + self?.languageFilterButtonTitle = userFilters.languageFilter?.translatedName ?? "" self?.lessonFilterLanguageSelection = userFilters.languageFilter } .store(in: &cancellables) diff --git a/godtools/Base.lproj/Localizable.strings b/godtools/Base.lproj/Localizable.strings index 358bf27fff..23f4662128 100644 --- a/godtools/Base.lproj/Localizable.strings +++ b/godtools/Base.lproj/Localizable.strings @@ -1,4 +1,4 @@ -"lessons.filter.navBar.language" = "CHANGE THIS"; +"lessons.filter.navBar.language" = "Lesson language"; "lessons.languageFilter.title" = "Lessons in:"; "language_name_fil-x-taglish" = "Taglish";