mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-11-06 17:00:13 +00:00
Various improvements
This commit is contained in:
parent
5a1ea16354
commit
f97c2b9924
@ -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";
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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 }
|
||||
|
||||
@ -426,7 +426,7 @@ public func presentAgeVerification(context: AccountContext, parentController: Vi
|
||||
})
|
||||
}
|
||||
|
||||
func updateAgeVerificationState(engine: TelegramEngine, _ f: @escaping (AgeVerificationState) -> AgeVerificationState) -> Signal<Never, NoError> {
|
||||
public func updateAgeVerificationState(engine: TelegramEngine, _ f: @escaping (AgeVerificationState) -> AgeVerificationState) -> Signal<Never, NoError> {
|
||||
return engine.preferences.update(id: ApplicationSpecificPreferencesKeys.ageVerificationState, { entry in
|
||||
let currentSettings: AgeVerificationState
|
||||
if let entry = entry?.get(AgeVerificationState.self) {
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"app": "11.13.2",
|
||||
"app": "11.14",
|
||||
"xcode": "16.2",
|
||||
"bazel": "8.2.1:22ff65b05869f6160e5157b1b425a14a62085d71d8baef571f462b8fe5a703a3",
|
||||
"macos": "15"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user