mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-07 09:20:08 +00:00
Fix
This commit is contained in:
parent
bc49c5e788
commit
9c47496253
@ -2937,6 +2937,9 @@ public final class PeerInfoStoryPaneNode: ASDisplayNode, PeerInfoPaneNode, ASScr
|
|||||||
if !storyFolders.contains(where: { $0.id == folder.id }) && !self.removedStoryFolders.contains(folder.id) {
|
if !storyFolders.contains(where: { $0.id == folder.id }) && !self.removedStoryFolders.contains(folder.id) {
|
||||||
storyFolders.append(folder)
|
storyFolders.append(folder)
|
||||||
}
|
}
|
||||||
|
if let index = storyFolders.firstIndex(where: { $0.id == folder.id }) {
|
||||||
|
storyFolders[index] = folder
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var hadLocalItems = false
|
var hadLocalItems = false
|
||||||
@ -3856,6 +3859,18 @@ public final class PeerInfoStoryPaneNode: ASDisplayNode, PeerInfoPaneNode, ASScr
|
|||||||
})))
|
})))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO:localize
|
||||||
|
items.append(.action(ContextMenuActionItem(text: "Rename Album", icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Edit"), color: theme.contextMenu.primaryColor) }, action: { [weak self] _, f in
|
||||||
|
guard let self else {
|
||||||
|
f(.default)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
f(.dismissWithoutContent)
|
||||||
|
|
||||||
|
self.presentRenameStoryFolder(id: folder.id, title: folder.title)
|
||||||
|
})))
|
||||||
|
|
||||||
//TODO:localize
|
//TODO:localize
|
||||||
items.append(.action(ContextMenuActionItem(text: "Share", icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Forward"), color: theme.contextMenu.primaryColor) }, action: { [weak self] _, f in
|
items.append(.action(ContextMenuActionItem(text: "Share", icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Forward"), color: theme.contextMenu.primaryColor) }, action: { [weak self] _, f in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
@ -3883,18 +3898,6 @@ public final class PeerInfoStoryPaneNode: ASDisplayNode, PeerInfoPaneNode, ASScr
|
|||||||
self.beginReordering()
|
self.beginReordering()
|
||||||
})))
|
})))
|
||||||
|
|
||||||
//TODO:localize
|
|
||||||
items.append(.action(ContextMenuActionItem(text: "Rename Album", textColor: .destructive, icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Edit"), color: theme.contextMenu.destructiveColor) }, action: { [weak self] _, f in
|
|
||||||
guard let self else {
|
|
||||||
f(.default)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
f(.dismissWithoutContent)
|
|
||||||
|
|
||||||
self.presentRenameStoryFolder(id: folder.id, title: folder.title)
|
|
||||||
})))
|
|
||||||
|
|
||||||
//TODO:localize
|
//TODO:localize
|
||||||
items.append(.action(ContextMenuActionItem(text: "Delete Album", textColor: .destructive, icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Delete"), color: theme.contextMenu.destructiveColor) }, action: { [weak self] _, f in
|
items.append(.action(ContextMenuActionItem(text: "Delete Album", textColor: .destructive, icon: { theme in generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Delete"), color: theme.contextMenu.destructiveColor) }, action: { [weak self] _, f in
|
||||||
guard let self else {
|
guard let self else {
|
||||||
@ -4979,7 +4982,7 @@ public final class PeerInfoStoryPaneNode: ASDisplayNode, PeerInfoPaneNode, ASScr
|
|||||||
}
|
}
|
||||||
if let value {
|
if let value {
|
||||||
if let listSource = self.listSource as? PeerStoryListContext {
|
if let listSource = self.listSource as? PeerStoryListContext {
|
||||||
let _ = listSource.renameFolder(id: id, title: value).start()
|
let _ = listSource.renameFolder(id: id, title: value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user