mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 03:20:48 +00:00
WIP: Fix precise ban timer (?)
This commit is contained in:
parent
1405e26da3
commit
3b71399019
@ -68,7 +68,7 @@ private final class PeerBanTimeoutActionSheetItem: ActionSheetItem {
|
||||
|
||||
init(strings: PresentationStrings, currentValue: Int32, valueChanged: @escaping (Int32) -> Void) {
|
||||
self.strings = strings
|
||||
self.currentValue = roundDateToDays(currentValue)
|
||||
self.currentValue = /*roundDateToDays(*/currentValue/*)*/
|
||||
self.valueChanged = valueChanged
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ private final class PeerBanTimeoutActionSheetItemNode: ActionSheetItemNode {
|
||||
self.pickerView = UIDatePicker()
|
||||
self.pickerView.datePickerMode = .countDownTimer
|
||||
self.pickerView.datePickerMode = .dateAndTime
|
||||
self.pickerView.date = Date(timeIntervalSince1970: Double(roundDateToDays(currentValue)))
|
||||
self.pickerView.date = Date(timeIntervalSince1970: Double(/*roundDateToDays(*/currentValue/*)*/))
|
||||
self.pickerView.locale = localeWithStrings(strings)
|
||||
self.pickerView.minimumDate = Date()
|
||||
self.pickerView.maximumDate = Date(timeIntervalSince1970: Double(Int32.max - 1))
|
||||
@ -122,6 +122,6 @@ private final class PeerBanTimeoutActionSheetItemNode: ActionSheetItemNode {
|
||||
}
|
||||
|
||||
@objc private func datePickerUpdated() {
|
||||
self.valueChanged(roundDateToDays(Int32(self.pickerView.date.timeIntervalSince1970)))
|
||||
self.valueChanged(/*roundDateToDays(*/Int32(self.pickerView.date.timeIntervalSince1970)/*)*/)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user