mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Add tooltips for removal success in Data Settings screen
This commit is contained in:
@@ -9,11 +9,11 @@ import TelegramPresentationData
|
||||
import TelegramUIPreferences
|
||||
import ItemListUI
|
||||
import PresentationDataUtils
|
||||
import OverlayStatusController
|
||||
import AccountContext
|
||||
import AlertUI
|
||||
import PresentationDataUtils
|
||||
import TelegramNotices
|
||||
import UndoUI
|
||||
|
||||
private final class DataPrivacyControllerArguments {
|
||||
let account: Account
|
||||
@@ -368,7 +368,19 @@ public func dataPrivacyController(context: AccountContext) -> ViewController {
|
||||
return state
|
||||
}
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
presentControllerImpl?(OverlayStatusController(theme: presentationData.theme, type: .success))
|
||||
let text: String?
|
||||
if info.contains([.paymentInfo, .shippingInfo]) {
|
||||
text = presentationData.strings.Privacy_PaymentsClear_AllInfoCleared
|
||||
} else if info.contains(.paymentInfo) {
|
||||
text = presentationData.strings.Privacy_PaymentsClear_PaymentInfoCleared
|
||||
} else if info.contains(.shippingInfo) {
|
||||
text = presentationData.strings.Privacy_PaymentsClear_ShippingInfoCleared
|
||||
} else {
|
||||
text = nil
|
||||
}
|
||||
if let text = text {
|
||||
presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .succeed(text: text), elevatedLayout: false, action: { _ in return false }))
|
||||
}
|
||||
}))
|
||||
}
|
||||
dismissAction()
|
||||
@@ -422,7 +434,7 @@ public func dataPrivacyController(context: AccountContext) -> ViewController {
|
||||
return state
|
||||
}
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
presentControllerImpl?(OverlayStatusController(theme: presentationData.theme, type: .success))
|
||||
presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .succeed(text: presentationData.strings.Privacy_ContactsSync_ContactsDeleted), elevatedLayout: false, action: { _ in return false }))
|
||||
}))
|
||||
}), TextAlertAction(type: .defaultAction, title: presentationData.strings.Common_Cancel, action: {})]))
|
||||
}
|
||||
@@ -478,7 +490,7 @@ public func dataPrivacyController(context: AccountContext) -> ViewController {
|
||||
return state
|
||||
}
|
||||
let presentationData = context.sharedContext.currentPresentationData.with { $0 }
|
||||
presentControllerImpl?(OverlayStatusController(theme: presentationData.theme, type: .success))
|
||||
presentControllerImpl?(UndoOverlayController(presentationData: presentationData, content: .succeed(text: presentationData.strings.Privacy_DeleteDrafts_DraftsDeleted), elevatedLayout: false, action: { _ in return false }))
|
||||
}))
|
||||
}
|
||||
dismissAction()
|
||||
@@ -530,7 +542,7 @@ public func dataPrivacyController(context: AccountContext) -> ViewController {
|
||||
|
||||
let controller = ItemListController(context: context, state: signal)
|
||||
presentControllerImpl = { [weak controller] c in
|
||||
controller?.present(c, in: .window(.root), with: ViewControllerPresentationArguments(presentationAnimation: .modalSheet))
|
||||
controller?.present(c, in: .window(.root))
|
||||
}
|
||||
|
||||
return controller
|
||||
|
||||
Reference in New Issue
Block a user