mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Add external sticker set import
This commit is contained in:
@@ -23,6 +23,7 @@ import ShareController
|
||||
import ChatInterfaceState
|
||||
import TelegramCallsUI
|
||||
import UndoUI
|
||||
import ImportStickerPackUI
|
||||
|
||||
private func defaultNavigationForPeerId(_ peerId: PeerId?, navigation: ChatControllerInteractionNavigateToPeer) -> ChatControllerInteractionNavigateToPeer {
|
||||
if case .default = navigation {
|
||||
@@ -480,5 +481,16 @@ func openResolvedUrlImpl(_ resolvedUrl: ResolvedUrl, context: AccountContext, ur
|
||||
}), on: .root, blockInteraction: false, completion: {})
|
||||
}))
|
||||
}
|
||||
case .importStickers:
|
||||
dismissInput()
|
||||
if let navigationController = navigationController, let data = UIPasteboard.general.data(forPasteboardType: "org.telegram.third-party.stickerpack"), let stickerPack = ImportStickerPack(data: data) {
|
||||
for controller in navigationController.overlayControllers {
|
||||
if controller is ImportStickerPackController {
|
||||
controller.dismiss()
|
||||
}
|
||||
}
|
||||
let controller = ImportStickerPackController(context: context, stickerPack: stickerPack, parentNavigationController: navigationController)
|
||||
present(controller, nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user