diff --git a/Telegram/Telegram-iOS/en.lproj/Localizable.strings b/Telegram/Telegram-iOS/en.lproj/Localizable.strings index d8f903f191..bf3f23fa3b 100644 --- a/Telegram/Telegram-iOS/en.lproj/Localizable.strings +++ b/Telegram/Telegram-iOS/en.lproj/Localizable.strings @@ -14699,3 +14699,6 @@ Sorry for the inconvenience."; "Chat.SensitiveContentShort" = "18+"; "AccessDenied.AgeVerificationCamera" = "Telegram needs access to your camera for age verification.\n\nOpen your device's Settings > Privacy > Camera and set Telegram to ON."; + +"PeerInfo.Gifts.RemoveCollectionConfirmation" = "This will remove the collection."; +"PeerInfo.Gifts.RemoveCollectionAction" = "Remove"; diff --git a/submodules/SettingsUI/BUILD b/submodules/SettingsUI/BUILD index edf5e5466d..bfb017f963 100644 --- a/submodules/SettingsUI/BUILD +++ b/submodules/SettingsUI/BUILD @@ -126,6 +126,7 @@ swift_library( "//submodules/TelegramUI/Components/Settings/ThemeAccentColorScreen", "//submodules/TelegramUI/Components/Settings/GenerateThemeName", "//submodules/TelegramUI/Components/Settings/PeerNameColorItem", + "//submodules/TelegramUI/Components/FaceScanScreen", ], visibility = [ "//visibility:public", diff --git a/submodules/SettingsUI/Sources/Data and Storage/DataAndStorageSettingsController.swift b/submodules/SettingsUI/Sources/Data and Storage/DataAndStorageSettingsController.swift index 850a95f6a5..082da648a9 100644 --- a/submodules/SettingsUI/Sources/Data and Storage/DataAndStorageSettingsController.swift +++ b/submodules/SettingsUI/Sources/Data and Storage/DataAndStorageSettingsController.swift @@ -14,6 +14,7 @@ import OpenInExternalAppUI import ItemListPeerActionItem import StorageUsageScreen import PresentationDataUtils +import FaceScanScreen public enum AutomaticSaveIncomingPeerType { case privateChats @@ -911,6 +912,12 @@ public func dataAndStorageController(context: AccountContext, focusOnItemTag: Da } }) updateSensitiveContentDisposable.set(updateRemoteContentSettingsConfiguration(postbox: context.account.postbox, network: context.account.network, sensitiveContentEnabled: value).start()) + + if !value { + let _ = updateAgeVerificationState(engine: context.engine, { _ in + return AgeVerificationState(verificationPassed: false) + }).start() + } } if value { let presentationData = context.sharedContext.currentPresentationData.with { $0 } diff --git a/submodules/TelegramUI/Components/FaceScanScreen/Sources/AgeVerificationScreen.swift b/submodules/TelegramUI/Components/FaceScanScreen/Sources/AgeVerificationScreen.swift index dca84e1f4b..3db2875d86 100644 --- a/submodules/TelegramUI/Components/FaceScanScreen/Sources/AgeVerificationScreen.swift +++ b/submodules/TelegramUI/Components/FaceScanScreen/Sources/AgeVerificationScreen.swift @@ -426,7 +426,7 @@ public func presentAgeVerification(context: AccountContext, parentController: Vi }) } -func updateAgeVerificationState(engine: TelegramEngine, _ f: @escaping (AgeVerificationState) -> AgeVerificationState) -> Signal { +public func updateAgeVerificationState(engine: TelegramEngine, _ f: @escaping (AgeVerificationState) -> AgeVerificationState) -> Signal { return engine.preferences.update(id: ApplicationSpecificPreferencesKeys.ageVerificationState, { entry in let currentSettings: AgeVerificationState if let entry = entry?.get(AgeVerificationState.self) { diff --git a/submodules/TelegramUI/Components/PeerInfo/PeerInfoVisualMediaPaneNode/Sources/PeerInfoGiftsPaneNode.swift b/submodules/TelegramUI/Components/PeerInfo/PeerInfoVisualMediaPaneNode/Sources/PeerInfoGiftsPaneNode.swift index 5e91ca0b04..080a735761 100644 --- a/submodules/TelegramUI/Components/PeerInfo/PeerInfoVisualMediaPaneNode/Sources/PeerInfoGiftsPaneNode.swift +++ b/submodules/TelegramUI/Components/PeerInfo/PeerInfoVisualMediaPaneNode/Sources/PeerInfoGiftsPaneNode.swift @@ -219,8 +219,27 @@ public final class PeerInfoGiftsPaneNode: ASDisplayNode, PeerInfoPaneNode, UIScr } public func deleteCollection(id: Int32) { - self.setCurrentCollection(collection: .all) - let _ = self.profileGiftsCollections.deleteCollection(id: id).start() + guard let params = self.currentParams else { + return + } + let actionSheet = ActionSheetController(presentationData: params.presentationData) + actionSheet.setItemGroups([ + ActionSheetItemGroup(items: [ + ActionSheetTextItem(title: params.presentationData.strings.PeerInfo_Gifts_RemoveCollectionConfirmation), + ActionSheetButtonItem(title: params.presentationData.strings.PeerInfo_Gifts_RemoveCollectionAction, color: .destructive, action: { [weak self, weak actionSheet] in + actionSheet?.dismissAnimated() + + self?.setCurrentCollection(collection: .all) + let _ = self?.profileGiftsCollections.deleteCollection(id: id).start() + }) + ]), + ActionSheetItemGroup(items: [ + ActionSheetButtonItem(title: params.presentationData.strings.Common_Cancel, color: .accent, font: .bold, action: { [weak actionSheet] in + actionSheet?.dismissAnimated() + }) + ]) + ]) + self.parentController?.present(actionSheet, in: .window(.root)) } public func addGiftsToCollection(id: Int32) { diff --git a/versions.json b/versions.json index 4f5268a342..059b1bfd9a 100644 --- a/versions.json +++ b/versions.json @@ -1,5 +1,5 @@ { - "app": "11.13.2", + "app": "11.14", "xcode": "16.2", "bazel": "8.2.1:22ff65b05869f6160e5157b1b425a14a62085d71d8baef571f462b8fe5a703a3", "macos": "15"