mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Theme fixes
This commit is contained in:
parent
2cb6ebc410
commit
533257976b
34 changed files with 217 additions and 189 deletions
|
|
@ -143,6 +143,16 @@ public final class SegmentedControlNode: ASDisplayNode, UIGestureRecognizerDeleg
|
|||
}
|
||||
}
|
||||
|
||||
public func setSelectedIndex(_ index: Int, animated: Bool) {
|
||||
guard index != self._selectedIndex else {
|
||||
return
|
||||
}
|
||||
self._selectedIndex = index
|
||||
if let layout = self.validLayout {
|
||||
let _ = self.updateLayout(layout, transition: .animated(duration: 0.2, curve: .easeInOut))
|
||||
}
|
||||
}
|
||||
|
||||
public var selectedIndexChanged: (Int) -> Void = { _ in }
|
||||
public var selectedIndexShouldChange: (Int, @escaping (Bool) -> Void) -> Void = { _, f in
|
||||
f(true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue