mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-05 05:51:42 +00:00
Fix merge
This commit is contained in:
parent
6713e11d2a
commit
cbbf1cd7e9
@ -1017,7 +1017,7 @@ public class ChatListController: TelegramController, KeyShortcutResponder, UIVie
|
|||||||
let openChat: (Int) -> Void = { [weak self] index in
|
let openChat: (Int) -> Void = { [weak self] index in
|
||||||
if let strongSelf = self {
|
if let strongSelf = self {
|
||||||
if index == 0 {
|
if index == 0 {
|
||||||
strongSelf.chatListDisplayNode.chatListNode.selectChat(.peerId(strongSelf.account.peerId))
|
strongSelf.chatListDisplayNode.chatListNode.selectChat(.peerId(strongSelf.context.account.peerId))
|
||||||
} else {
|
} else {
|
||||||
strongSelf.chatListDisplayNode.chatListNode.selectChat(.index(index - 1))
|
strongSelf.chatListDisplayNode.chatListNode.selectChat(.index(index - 1))
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1219,7 +1219,7 @@ final class ChatListNode: ListView {
|
|||||||
guard index < 10 else {
|
guard index < 10 else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let _ = (chatListViewForLocation(groupId: nil, location: .initial(count: 10), account: self.account)
|
let _ = (chatListViewForLocation(groupId: nil, location: .initial(count: 10), account: self.context.account)
|
||||||
|> take(1)
|
|> take(1)
|
||||||
|> deliverOnMainQueue).start(next: { update in
|
|> deliverOnMainQueue).start(next: { update in
|
||||||
let entries = update.view.entries
|
let entries = update.view.entries
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -612,7 +612,7 @@ final class SetupTwoStepVerificationControllerNode: ViewControllerTracingNode {
|
|||||||
state.data.activity = true
|
state.data.activity = true
|
||||||
return state
|
return state
|
||||||
}, transition: .animated(duration: 0.5, curve: .spring))
|
}, transition: .animated(duration: 0.5, curve: .spring))
|
||||||
strongSelf.actionDisposable.set((updateTwoStepVerificationEmail(account: strongSelf.context.account, currentPassword: password, updatedEmail: email)
|
strongSelf.actionDisposable.set((updateTwoStepVerificationEmail(network: strongSelf.context.account.network, currentPassword: password, updatedEmail: email)
|
||||||
|> deliverOnMainQueue).start(next: { result in
|
|> deliverOnMainQueue).start(next: { result in
|
||||||
guard let strongSelf = self else {
|
guard let strongSelf = self else {
|
||||||
return
|
return
|
||||||
|
|||||||
@ -344,35 +344,10 @@ public func themeSettingsController(context: AccountContext) -> ViewController {
|
|||||||
wallpaper = settings.chatWallpaper
|
wallpaper = settings.chatWallpaper
|
||||||
fontSize = settings.fontSize
|
fontSize = settings.fontSize
|
||||||
|
|
||||||
if let localizationSettings = preferences.values[localizationSettingsKey] as? LocalizationSettings {
|
|
||||||
strings = PresentationStrings(primaryComponent: PresentationStringsComponent(languageCode: localizationSettings.primaryComponent.languageCode, localizedName: localizationSettings.primaryComponent.localizedName, pluralizationRulesCode: localizationSettings.primaryComponent.customPluralizationCode, dict: dictFromLocalization(localizationSettings.primaryComponent.localization)), secondaryComponent: localizationSettings.secondaryComponent.flatMap({ PresentationStringsComponent(languageCode: $0.languageCode, localizedName: $0.localizedName, pluralizationRulesCode: $0.customPluralizationCode, dict: dictFromLocalization($0.localization)) }))
|
|
||||||
} else {
|
|
||||||
strings = defaultPresentationStrings
|
|
||||||
}
|
|
||||||
|
|
||||||
dateTimeFormat = presentationData.dateTimeFormat
|
dateTimeFormat = presentationData.dateTimeFormat
|
||||||
disableAnimations = settings.disableAnimations
|
disableAnimations = settings.disableAnimations
|
||||||
|
|
||||||
let controllerState = ItemListControllerState(theme: presentationData.theme, title: .text(presentationData.strings.Appearance_Title), leftNavigationButton: nil, rightNavigationButton: nil, backNavigationButton: ItemListBackButton(title: strings.Common_Back))
|
let controllerState = ItemListControllerState(theme: presentationData.theme, title: .text(presentationData.strings.Appearance_Title), leftNavigationButton: nil, rightNavigationButton: nil, backNavigationButton: ItemListBackButton(title: presentationData.strings.Common_Back))
|
||||||
let listState = ItemListNodeState(entries: themeSettingsControllerEntries(presentationData: presentationData, theme: theme, themeAccentColor: settings.themeAccentColor, autoNightSettings: settings.automaticThemeSwitchSetting, strings: presentationData.strings, wallpaper: wallpaper, fontSize: fontSize, dateTimeFormat: dateTimeFormat, disableAnimations: disableAnimations), style: .blocks, animateChanges: false)
|
|
||||||
|
|
||||||
if previousTheme.swap(theme)?.name != theme.name {
|
|
||||||
presentControllerImpl?(ThemeSettingsCrossfadeController())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
wallpaper = settings.chatWallpaper
|
|
||||||
fontSize = settings.fontSize
|
|
||||||
|
|
||||||
if let localizationSettings = sharedData.entries[SharedDataKeys.localizationSettings] as? LocalizationSettings {
|
|
||||||
strings = PresentationStrings(primaryComponent: PresentationStringsComponent(languageCode: localizationSettings.primaryComponent.languageCode, localizedName: localizationSettings.primaryComponent.localizedName, pluralizationRulesCode: localizationSettings.primaryComponent.customPluralizationCode, dict: dictFromLocalization(localizationSettings.primaryComponent.localization)), secondaryComponent: localizationSettings.secondaryComponent.flatMap({ PresentationStringsComponent(languageCode: $0.languageCode, localizedName: $0.localizedName, pluralizationRulesCode: $0.customPluralizationCode, dict: dictFromLocalization($0.localization)) }))
|
|
||||||
} else {
|
|
||||||
strings = defaultPresentationStrings
|
|
||||||
}
|
|
||||||
|
|
||||||
dateTimeFormat = presentationData.dateTimeFormat
|
|
||||||
disableAnimations = settings.disableAnimations
|
|
||||||
|
|
||||||
let controllerState = ItemListControllerState(theme: presentationData.theme, title: .text(presentationData.strings.Appearance_Title), leftNavigationButton: nil, rightNavigationButton: nil, backNavigationButton: ItemListBackButton(title: strings.Common_Back))
|
|
||||||
let listState = ItemListNodeState(entries: themeSettingsControllerEntries(presentationData: presentationData, theme: theme, themeAccentColor: settings.themeAccentColor, autoNightSettings: settings.automaticThemeSwitchSetting, strings: presentationData.strings, wallpaper: wallpaper, fontSize: fontSize, dateTimeFormat: dateTimeFormat, disableAnimations: disableAnimations), style: .blocks, animateChanges: false)
|
let listState = ItemListNodeState(entries: themeSettingsControllerEntries(presentationData: presentationData, theme: theme, themeAccentColor: settings.themeAccentColor, autoNightSettings: settings.automaticThemeSwitchSetting, strings: presentationData.strings, wallpaper: wallpaper, fontSize: fontSize, dateTimeFormat: dateTimeFormat, disableAnimations: disableAnimations), style: .blocks, animateChanges: false)
|
||||||
|
|
||||||
if previousTheme.swap(theme)?.name != theme.name {
|
if previousTheme.swap(theme)?.name != theme.name {
|
||||||
@ -381,28 +356,6 @@ public func themeSettingsController(context: AccountContext) -> ViewController {
|
|||||||
|
|
||||||
return (controllerState, (listState, arguments))
|
return (controllerState, (listState, arguments))
|
||||||
}
|
}
|
||||||
/* wallpaper = settings.chatWallpaper
|
|
||||||
wallpaperMode = settings.chatWallpaperOptions
|
|
||||||
fontSize = settings.fontSize
|
|
||||||
|
|
||||||
if let localizationSettings = sharedData.entries[SharedDataKeys.localizationSettings] as? LocalizationSettings {
|
|
||||||
strings = PresentationStrings(primaryComponent: PresentationStringsComponent(languageCode: localizationSettings.primaryComponent.languageCode, localizedName: localizationSettings.primaryComponent.localizedName, pluralizationRulesCode: localizationSettings.primaryComponent.customPluralizationCode, dict: dictFromLocalization(localizationSettings.primaryComponent.localization)), secondaryComponent: localizationSettings.secondaryComponent.flatMap({ PresentationStringsComponent(languageCode: $0.languageCode, localizedName: $0.localizedName, pluralizationRulesCode: $0.customPluralizationCode, dict: dictFromLocalization($0.localization)) }))
|
|
||||||
} else {
|
|
||||||
strings = defaultPresentationStrings
|
|
||||||
}
|
|
||||||
|
|
||||||
dateTimeFormat = presentationData.dateTimeFormat
|
|
||||||
disableAnimations = settings.disableAnimations
|
|
||||||
|
|
||||||
let controllerState = ItemListControllerState(theme: presentationData.theme, title: .text(presentationData.strings.Appearance_Title), leftNavigationButton: nil, rightNavigationButton: nil, backNavigationButton: ItemListBackButton(title: strings.Common_Back))
|
|
||||||
let listState = ItemListNodeState(entries: themeSettingsControllerEntries(presentationData: presentationData, theme: theme, themeAccentColor: settings.themeAccentColor, autoNightSettings: settings.automaticThemeSwitchSetting, strings: presentationData.strings, wallpaper: wallpaper, wallpaperMode: wallpaperMode, fontSize: fontSize, dateTimeFormat: dateTimeFormat, disableAnimations: disableAnimations), style: .blocks, animateChanges: false)
|
|
||||||
|
|
||||||
if previousTheme.swap(theme)?.name != theme.name {
|
|
||||||
presentControllerImpl?(ThemeSettingsCrossfadeController())
|
|
||||||
}
|
|
||||||
|
|
||||||
return (controllerState, (listState, arguments))
|
|
||||||
}*/
|
|
||||||
|
|
||||||
let controller = ItemListController(context: context, state: signal)
|
let controller = ItemListController(context: context, state: signal)
|
||||||
pushControllerImpl = { [weak controller] c in
|
pushControllerImpl = { [weak controller] c in
|
||||||
|
|||||||
@ -348,7 +348,7 @@ func twoStepVerificationPasswordEntryController(context: AccountContext, mode: T
|
|||||||
presentControllerImpl?(standardTextAlertController(theme: AlertControllerTheme(presentationTheme: presentationData.theme), title: nil, text: alertText, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
|
presentControllerImpl?(standardTextAlertController(theme: AlertControllerTheme(presentationTheme: presentationData.theme), title: nil, text: alertText, actions: [TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_OK, action: {})]), ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
|
||||||
}))
|
}))
|
||||||
case let .setupEmail(password):
|
case let .setupEmail(password):
|
||||||
updatePasswordDisposable.set((updateTwoStepVerificationEmail(account: context.account, currentPassword: password, updatedEmail: email) |> deliverOnMainQueue).start(next: { update in
|
updatePasswordDisposable.set((updateTwoStepVerificationEmail(network: context.account.network, currentPassword: password, updatedEmail: email) |> deliverOnMainQueue).start(next: { update in
|
||||||
updateState {
|
updateState {
|
||||||
$0.withUpdatedUpdating(false)
|
$0.withUpdatedUpdating(false)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user