Various improvements

This commit is contained in:
Ilya Laktyushin
2025-03-10 15:32:15 +04:00
parent b864b88935
commit 2ecbaf4507
75 changed files with 1653 additions and 126 deletions

View File

@@ -294,7 +294,7 @@ public final class AccountContextImpl: AccountContext {
self.wallpaperUploadManager = WallpaperUploadManagerImpl(sharedContext: sharedContext, account: account, presentationData: sharedContext.presentationData)
self.themeUpdateManager = ThemeUpdateManagerImpl(sharedContext: sharedContext, account: account)
self.inAppPurchaseManager = InAppPurchaseManager(engine: self.engine)
self.inAppPurchaseManager = InAppPurchaseManager(engine: .authorized(self.engine))
self.starsContext = self.engine.payments.peerStarsContext()
} else {
self.prefetchManager = nil
@@ -356,8 +356,9 @@ public final class AccountContextImpl: AccountContext {
self.currentCountriesConfiguration = Atomic(value: CountriesConfiguration(countries: loadCountryCodes()))
if !temp {
let langCode = sharedContext.currentPresentationData.with { $0 }.strings.baseLanguageCode
let currentCountriesConfiguration = self.currentCountriesConfiguration
self.countriesConfigurationDisposable = (self.engine.localization.getCountriesList(accountManager: sharedContext.accountManager, langCode: nil)
self.countriesConfigurationDisposable = (self.engine.localization.getCountriesList(accountManager: sharedContext.accountManager, langCode: langCode)
|> deliverOnMainQueue).start(next: { value in
let _ = currentCountriesConfiguration.swap(CountriesConfiguration(countries: value))
})