Folder improvements

This commit is contained in:
Ali
2023-04-04 00:09:59 +04:00
parent 05518d735d
commit 3825ddd778
9 changed files with 515 additions and 45 deletions

View File

@@ -2769,27 +2769,29 @@ public class ChatListControllerImpl: TelegramBaseController, ChatListController
return
}
let previewScreen = ChatFolderLinkPreviewScreen(
context: self.context,
subject: .linkList(folderId: filterId, initialLinks: links ?? []),
contents: ChatFolderLinkContents(
localFilterId: filterId, title: title,
peers: [],
alreadyMemberPeerIds: Set(),
memberCounts: [:]
),
completion: nil
)
self.push(previewScreen)
if links == nil || links?.count == 0 {
openCreateChatListFolderLink(context: self.context, folderId: filterId, checkIfExists: false, title: title, peerIds: data.includePeers.peers, pushController: { [weak self] c in
self?.push(c)
}, presentController: { [weak self] c in
self?.present(c, in: .window(.root))
}, completed: {
}, linkUpdated: { _ in
})
} else {
let previewScreen = ChatFolderLinkPreviewScreen(
context: self.context,
subject: .linkList(folderId: filterId, initialLinks: links ?? []),
contents: ChatFolderLinkContents(
localFilterId: filterId, title: title,
peers: [],
alreadyMemberPeerIds: Set(),
memberCounts: [:]
),
completion: nil
)
self.push(previewScreen)
}
})
/*openCreateChatListFolderLink(context: self.context, folderId: filterId, checkIfExists: true, title: title, peerIds: data.includePeers.peers, pushController: { [weak self] c in
self?.push(c)
}, presentController: { [weak self] c in
self?.present(c, in: .window(.root))
}, completed: {
}, linkUpdated: { _ in
})*/
}
public func navigateToFolder(folderId: Int32, completion: @escaping () -> Void) {