mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix saved message handling
This commit is contained in:
parent
76a78d3fb0
commit
5342401f31
@ -469,7 +469,11 @@ public class ItemListDisclosureItemNode: ListViewItemNode, ItemListItemNode {
|
|||||||
if case let .channel(channel) = iconPeer, channel.flags.contains(.isForum) {
|
if case let .channel(channel) = iconPeer, channel.flags.contains(.isForum) {
|
||||||
clipStyle = .roundedRect
|
clipStyle = .roundedRect
|
||||||
}
|
}
|
||||||
avatarNode.setPeer(context: context, theme: item.presentationData.theme, peer: iconPeer, clipStyle: clipStyle)
|
var overrideImage: AvatarNodeImageOverride?
|
||||||
|
if iconPeer.id == context.account.peerId {
|
||||||
|
overrideImage = .savedMessagesIcon
|
||||||
|
}
|
||||||
|
avatarNode.setPeer(context: context, theme: item.presentationData.theme, peer: iconPeer, overrideImage: overrideImage, clipStyle: clipStyle)
|
||||||
} else if let avatarNode = strongSelf.avatarNode {
|
} else if let avatarNode = strongSelf.avatarNode {
|
||||||
strongSelf.avatarNode = nil
|
strongSelf.avatarNode = nil
|
||||||
avatarNode.removeFromSupernode()
|
avatarNode.removeFromSupernode()
|
||||||
|
@ -166,7 +166,14 @@ private enum StorageUsageExceptionsEntry: ItemListNodeEntry {
|
|||||||
optionText = timeIntervalString(strings: presentationData.strings, value: value)
|
optionText = timeIntervalString(strings: presentationData.strings, value: value)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ItemListDisclosureItem(presentationData: presentationData, icon: nil, context: arguments.context, iconPeer: EnginePeer(peer.peer), title: EnginePeer(peer.peer).displayTitle(strings: presentationData.strings, displayOrder: .firstLast), enabled: true, titleFont: .bold, label: optionText, labelStyle: .text, additionalDetailLabel: additionalDetailLabel, sectionId: self.section, style: .blocks, disclosureStyle: .optionArrows, action: {
|
let title: String
|
||||||
|
if peer.peer.id == arguments.context.account.peerId {
|
||||||
|
title = presentationData.strings.DialogList_SavedMessages
|
||||||
|
} else {
|
||||||
|
title = EnginePeer(peer.peer).displayTitle(strings: presentationData.strings, displayOrder: .firstLast)
|
||||||
|
}
|
||||||
|
|
||||||
|
return ItemListDisclosureItem(presentationData: presentationData, icon: nil, context: arguments.context, iconPeer: EnginePeer(peer.peer), title: title, enabled: true, titleFont: .bold, label: optionText, labelStyle: .text, additionalDetailLabel: additionalDetailLabel, sectionId: self.section, style: .blocks, disclosureStyle: .optionArrows, action: {
|
||||||
arguments.openPeerMenu(peer.peer.id, value)
|
arguments.openPeerMenu(peer.peer.id, value)
|
||||||
}, tag: StorageUsageExceptionsEntryTag.peer(peer.peer.id))
|
}, tag: StorageUsageExceptionsEntryTag.peer(peer.peer.id))
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user