[WIP] Message auto-delete and widget

This commit is contained in:
Ali
2021-02-09 22:55:41 +04:00
parent d7538bf131
commit 3880af10ae
38 changed files with 1009 additions and 766 deletions

View File

@@ -44,6 +44,16 @@ func leftNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Cha
canClear = true
} else if let peer = peer as? TelegramChannel, case .group = peer.info, peer.addressName == nil && presentationInterfaceState.peerGeoLocation == nil {
canClear = true
} else if let peer = peer as? TelegramChannel {
if case .broadcast = peer.info {
//TODO:localize
title = "Clear Channel"
}
if peer.hasPermission(.changeInfo) {
canClear = true
} else {
canClear = false
}
} else {
canClear = false
}