notification exceptions

This commit is contained in:
overtake 2018-11-21 02:16:59 +04:00
parent 08cf916a83
commit 51e5ffbfa6
5 changed files with 8 additions and 6 deletions

View File

@ -729,7 +729,7 @@ public func channelInfoController(account: Account, peerId: PeerId) -> ViewContr
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())
})
presentControllerImpl?(controller, ViewControllerPresentationArguments(presentationAnimation: .modalSheet))

View File

@ -948,6 +948,8 @@ final class ChatListSearchContainerNode: SearchDisplayControllerContentNode {
strongSelf.listNode.isHidden = !displayingResults
strongSelf.recentListNode.isHidden = displayingResults || strongSelf.filter.contains(.excludeRecent)
strongSelf.dimNode.isHidden = displayingResults
strongSelf.backgroundColor = !displayingResults && strongSelf.filter.contains(.excludeRecent) ? nil : strongSelf.presentationData.theme.chatList.backgroundColor
}
})
}

View File

@ -1288,7 +1288,7 @@ public func groupInfoController(account: Account, peerId: PeerId) -> ViewControl
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())
})
presentControllerImpl?(controller, ViewControllerPresentationArguments(presentationAnimation: .modalSheet))

View File

@ -290,10 +290,6 @@ private func notificationsExceptionEntries(presentationData: PresentationData, s
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)")
}
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))
index += 1
}

View File

@ -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() {
self.searchBarNode = SearchBarPlaceholderNode()