TM-SGNL-iOS/SignalUI/AppLaunch/AppContext+SignalUI.swift
TeleMessage developers dde0620daf initial commit
2025-05-03 12:28:28 -07:00

25 lines
682 B
Swift

//
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
//
import Foundation
import SignalServiceKit
public class AppContextUtils {
private init() {}
public static func openSystemSettingsAction(completion: (() -> Void)? = nil) -> ActionSheetAction? {
guard CurrentAppContext().isMainApp else {
return nil
}
return ActionSheetAction(title: CommonStrings.openSettingsButton,
accessibilityIdentifier: "system_settings",
style: .default) { _ in
CurrentAppContext().openSystemSettings()
completion?()
}
}
}