Refactoring

This commit is contained in:
Ali
2021-08-01 18:12:53 +02:00
parent 878afc62bf
commit 648a74003e
87 changed files with 812 additions and 357 deletions

View File

@@ -2,7 +2,6 @@ import Foundation
import UIKit
import AsyncDisplayKit
import Display
import Postbox
import TelegramCore
import SwiftSignalKit
import TelegramPresentationData
@@ -83,7 +82,7 @@ public final class SelectablePeerNode: ASDisplayNode {
private var currentSelected = false
private var peer: RenderedPeer?
private var peer: EngineRenderedPeer?
public var theme: SelectablePeerNodeTheme = SelectablePeerNodeTheme(textColor: .black, secretTextColor: .green, selectedTextColor: .blue, checkBackgroundColor: .white, checkFillColor: .blue, checkColor: .white, avatarPlaceholderColor: .white) {
didSet {
@@ -136,7 +135,7 @@ public final class SelectablePeerNode: ASDisplayNode {
}
}
public func setup(context: AccountContext, theme: PresentationTheme, strings: PresentationStrings, peer: RenderedPeer, online: Bool = false, numberOfLines: Int = 2, synchronousLoad: Bool) {
public func setup(context: AccountContext, theme: PresentationTheme, strings: PresentationStrings, peer: EngineRenderedPeer, online: Bool = false, numberOfLines: Int = 2, synchronousLoad: Bool) {
let isFirstTime = self.peer == nil
self.peer = peer
guard let mainPeer = peer.chatMainPeer else {