mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-02-04 02:15:47 +00:00
Merge branch 'master' of github.com:peter-iakovlev/TelegramUI
This commit is contained in:
@@ -200,6 +200,13 @@ public enum NotificationExceptionMode : Equatable {
|
||||
}
|
||||
}
|
||||
|
||||
var isEmpty: Bool {
|
||||
switch self {
|
||||
case let .users(value), let .groups(value):
|
||||
return value.isEmpty
|
||||
}
|
||||
}
|
||||
|
||||
case users([PeerId : NotificationExceptionWrapper])
|
||||
case groups([PeerId : NotificationExceptionWrapper])
|
||||
|
||||
@@ -786,8 +793,6 @@ private final class NotificationExceptionsControllerNode: ASDisplayNode {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
self.readyValue.set(contentNode.ready)
|
||||
}
|
||||
|
||||
|
||||
@@ -423,14 +423,19 @@ private func notificationsAndSoundsEntries(globalSettings: GlobalNotificationSet
|
||||
entries.append(.messageAlerts(presentationData.theme, presentationData.strings.Notifications_MessageNotificationsAlert, globalSettings.privateChats.enabled))
|
||||
entries.append(.messagePreviews(presentationData.theme, presentationData.strings.Notifications_MessageNotificationsPreview, globalSettings.privateChats.displayPreviews))
|
||||
entries.append(.messageSound(presentationData.theme, presentationData.strings.Notifications_MessageNotificationsSound, localizedPeerNotificationSoundString(strings: presentationData.strings, sound: filteredGlobalSound(globalSettings.privateChats.sound)), filteredGlobalSound(globalSettings.privateChats.sound)))
|
||||
entries.append(.userExceptions(presentationData.theme, presentationData.strings, presentationData.strings.Notifications_MessageNotificationsExceptions, exceptions.0))
|
||||
if !exceptions.0.isEmpty {
|
||||
// entries.append(.userExceptions(presentationData.theme, presentationData.strings, presentationData.strings.Notifications_MessageNotificationsExceptions, exceptions.0))
|
||||
}
|
||||
entries.append(.messageNotice(presentationData.theme, presentationData.strings.Notifications_MessageNotificationsHelp))
|
||||
|
||||
entries.append(.groupHeader(presentationData.theme, presentationData.strings.Notifications_GroupNotifications))
|
||||
entries.append(.groupAlerts(presentationData.theme, presentationData.strings.Notifications_MessageNotificationsAlert, globalSettings.groupChats.enabled))
|
||||
entries.append(.groupPreviews(presentationData.theme, presentationData.strings.Notifications_MessageNotificationsPreview, globalSettings.groupChats.displayPreviews))
|
||||
entries.append(.groupSound(presentationData.theme, presentationData.strings.Notifications_MessageNotificationsSound, localizedPeerNotificationSoundString(strings: presentationData.strings, sound: filteredGlobalSound(globalSettings.groupChats.sound)), filteredGlobalSound(globalSettings.groupChats.sound)))
|
||||
entries.append(.groupExceptions(presentationData.theme, presentationData.strings, presentationData.strings.Notifications_MessageNotificationsExceptions, exceptions.1))
|
||||
if !exceptions.1.isEmpty {
|
||||
// entries.append(.groupExceptions(presentationData.theme, presentationData.strings, presentationData.strings.Notifications_MessageNotificationsExceptions, exceptions.1))
|
||||
}
|
||||
|
||||
entries.append(.groupNotice(presentationData.theme, presentationData.strings.Notifications_GroupNotificationsHelp))
|
||||
|
||||
entries.append(.inAppHeader(presentationData.theme, presentationData.strings.Notifications_InAppNotifications))
|
||||
@@ -585,7 +590,7 @@ public func notificationsAndSoundsController(account: Account) -> ViewController
|
||||
|
||||
for (key, value) in allSettings {
|
||||
let peer = transaction.getPeer(key)
|
||||
if let value = value as? TelegramPeerNotificationSettings, let peer = peer, !peer.displayTitle.isEmpty {
|
||||
if let value = value as? TelegramPeerNotificationSettings, let peer = peer, !peer.displayTitle.isEmpty, peer.id != account.peerId {
|
||||
switch value.muteState {
|
||||
case .default:
|
||||
switch value.messageSound {
|
||||
|
||||
Reference in New Issue
Block a user