diff --git a/Session/Home/GlobalSearch/GlobalSearchScreen.swift b/Session/Home/GlobalSearch/GlobalSearchScreen.swift index d0e0318cf..75c670387 100644 --- a/Session/Home/GlobalSearch/GlobalSearchScreen.swift +++ b/Session/Home/GlobalSearch/GlobalSearchScreen.swift @@ -365,7 +365,7 @@ struct SearchResultCell: View { // with the term so we use the regex below to ensure we only highlight those cases) normalizedSnippet .ranges( - of: (CurrentAppContext().isRTL ? + of: (Singleton.appContext.isRTL ? "(\(part.lowercased()))(^|[^a-zA-Z0-9])" : "(^|[^a-zA-Z0-9])(\(part.lowercased()))" ), diff --git a/SessionUIKit/Utilities/SwiftUI+Utilities.swift b/SessionUIKit/Utilities/SwiftUI+Utilities.swift index bc075f746..c209f263b 100644 --- a/SessionUIKit/Utilities/SwiftUI+Utilities.swift +++ b/SessionUIKit/Utilities/SwiftUI+Utilities.swift @@ -10,7 +10,7 @@ struct ViewControllerHolder { struct ViewControllerKey: EnvironmentKey { static var defaultValue: ViewControllerHolder { - return ViewControllerHolder(value: CurrentAppContext().mainWindow?.rootViewController) + return ViewControllerHolder(value: Singleton.appContext.mainWindow?.rootViewController) } }