mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 03:40:18 +00:00
notification exceptions
This commit is contained in:
parent
08cf916a83
commit
51e5ffbfa6
@ -729,7 +729,7 @@ public func channelInfoController(account: Account, peerId: PeerId) -> ViewContr
|
|||||||
viewSettings = GlobalNotificationSettingsSet.defaultSettings
|
viewSettings = GlobalNotificationSettingsSet.defaultSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
let controller = notificationMuteSettingsController(presentationData: presentationData, notificationSettings: viewSettings.privateChats, updateSettings: { value in
|
let controller = notificationMuteSettingsController(presentationData: presentationData, notificationSettings: viewSettings.channels, updateSettings: { value in
|
||||||
changeMuteSettingsDisposable.set(updatePeerMuteSetting(account: account, peerId: peerId, muteInterval: value).start())
|
changeMuteSettingsDisposable.set(updatePeerMuteSetting(account: account, peerId: peerId, muteInterval: value).start())
|
||||||
})
|
})
|
||||||
presentControllerImpl?(controller, ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
|
presentControllerImpl?(controller, ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
|
||||||
|
|||||||
@ -948,6 +948,8 @@ final class ChatListSearchContainerNode: SearchDisplayControllerContentNode {
|
|||||||
strongSelf.listNode.isHidden = !displayingResults
|
strongSelf.listNode.isHidden = !displayingResults
|
||||||
strongSelf.recentListNode.isHidden = displayingResults || strongSelf.filter.contains(.excludeRecent)
|
strongSelf.recentListNode.isHidden = displayingResults || strongSelf.filter.contains(.excludeRecent)
|
||||||
strongSelf.dimNode.isHidden = displayingResults
|
strongSelf.dimNode.isHidden = displayingResults
|
||||||
|
strongSelf.backgroundColor = !displayingResults && strongSelf.filter.contains(.excludeRecent) ? nil : strongSelf.presentationData.theme.chatList.backgroundColor
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1288,7 +1288,7 @@ public func groupInfoController(account: Account, peerId: PeerId) -> ViewControl
|
|||||||
viewSettings = GlobalNotificationSettingsSet.defaultSettings
|
viewSettings = GlobalNotificationSettingsSet.defaultSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
let controller = notificationMuteSettingsController(presentationData: presentationData, notificationSettings: viewSettings.privateChats, updateSettings: { value in
|
let controller = notificationMuteSettingsController(presentationData: presentationData, notificationSettings: viewSettings.groupChats, updateSettings: { value in
|
||||||
changeMuteSettingsDisposable.set(updatePeerMuteSetting(account: account, peerId: peerId, muteInterval: value).start())
|
changeMuteSettingsDisposable.set(updatePeerMuteSetting(account: account, peerId: peerId, muteInterval: value).start())
|
||||||
})
|
})
|
||||||
presentControllerImpl?(controller, ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
|
presentControllerImpl?(controller, ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
|
||||||
|
|||||||
@ -290,10 +290,6 @@ private func notificationsExceptionEntries(presentationData: PresentationData, s
|
|||||||
let soundName = localizedPeerNotificationSoundString(strings: presentationData.strings, sound: value.settings.messageSound)
|
let soundName = localizedPeerNotificationSoundString(strings: presentationData.strings, sound: value.settings.messageSound)
|
||||||
title += (title.isEmpty ? presentationData.strings.Notification_Exceptions_Sound(soundName).0 : ", \(presentationData.strings.Notification_Exceptions_Sound(soundName).0)")
|
title += (title.isEmpty ? presentationData.strings.Notification_Exceptions_Sound(soundName).0 : ", \(presentationData.strings.Notification_Exceptions_Sound(soundName).0)")
|
||||||
}
|
}
|
||||||
if value.peer.displayTitle == "Vyezd Family" {
|
|
||||||
var bp:Int = 0
|
|
||||||
bp += 1
|
|
||||||
}
|
|
||||||
entries.append(.peer(index: index, peer: value.peer, theme: presentationData.theme, strings: presentationData.strings, dateFormat: presentationData.dateTimeFormat, description: title, notificationSettings: value.settings, revealed: state.revealedPeerId == value.peer.id, editing: state.editing))
|
entries.append(.peer(index: index, peer: value.peer, theme: presentationData.theme, strings: presentationData.strings, dateFormat: presentationData.dateTimeFormat, description: title, notificationSettings: value.settings, revealed: state.revealedPeerId == value.peer.id, editing: state.editing))
|
||||||
index += 1
|
index += 1
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,6 +79,10 @@ class NotificationSearchItemNode: ListViewItemNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func animateRemoved(_ currentTimestamp: Double, duration: Double) {
|
||||||
|
self.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.15, removeOnCompletion: false)
|
||||||
|
}
|
||||||
|
|
||||||
required init() {
|
required init() {
|
||||||
self.searchBarNode = SearchBarPlaceholderNode()
|
self.searchBarNode = SearchBarPlaceholderNode()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user