Refactoring

This commit is contained in:
Ali
2021-08-12 16:41:11 +02:00
parent adc430b870
commit bf253eec46
84 changed files with 604 additions and 443 deletions

View File

@@ -30,7 +30,7 @@ private enum DebugAccountsControllerSection: Int32 {
}
private enum DebugAccountsControllerEntry: ItemListNodeEntry {
case record(PresentationTheme, AccountRecord, Bool)
case record(PresentationTheme, AccountRecord<TelegramAccountManagerTypes.Attribute>, Bool)
case loginNewAccount(PresentationTheme)
var section: ItemListSectionId {
@@ -87,7 +87,7 @@ private enum DebugAccountsControllerEntry: ItemListNodeEntry {
}
}
private func debugAccountsControllerEntries(view: AccountRecordsView, presentationData: PresentationData) -> [DebugAccountsControllerEntry] {
private func debugAccountsControllerEntries(view: AccountRecordsView<TelegramAccountManagerTypes>, presentationData: PresentationData) -> [DebugAccountsControllerEntry] {
var entries: [DebugAccountsControllerEntry] = []
for entry in view.records.sorted(by: {
@@ -101,7 +101,7 @@ private func debugAccountsControllerEntries(view: AccountRecordsView, presentati
return entries
}
public func debugAccountsController(context: AccountContext, accountManager: AccountManager) -> ViewController {
public func debugAccountsController(context: AccountContext, accountManager: AccountManager<TelegramAccountManagerTypes>) -> ViewController {
var presentControllerImpl: ((ViewController, ViewControllerPresentationArguments?) -> Void)?
let arguments = DebugAccountsControllerArguments(context: context, presentController: { controller, arguments in