Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Threema/ThreemaFramework/Business/   (Social Medium ©)  Datei vom 26.9.2026 mit Größe 1 kB image not shown  

Quelle  AppGroup+Swift.swift   Sprache: JAVA

 

import CocoaLumberjackSwift
import Foundation

extension AppGroup {

    public static func setMeActiveUnlessIPC(userSettings: any UserSettingsProtocol = UserSettings.shared()) {
        guard !userSettings.ipcCommunicationEnabled else {
            return
        }

        setMeActive()
    }

    @objc static func refreshDirtyObjects() {
        guard RemoteSecretProvider.isRemoteSecretManagerSet else {
            DDLogWarn(
                "Refresh of dirty objects not possible right now, because remote secret manager is not initialized"
            )
            return
        }

        let remoteSecretManager = RemoteSecretProvider.remoteSecretManager
        let persistenceManager = PersistenceManager(
            appGroupID: AppGroup.groupID(),
            userDefaults: AppGroup.userDefaults(),
            remoteSecretManager: remoteSecretManager
        )

        // Call refresh of dirty objects with reset `false` to not remove them from NSUserDefault.
        // Because of different processes of the Notification Extension (adding dirty objects)
        // and the App (refresh and remove dirty objects) it's not guaranteed that a dirty object has been refreshed.
        persistenceManager.dirtyObjectManager.refreshDirtyObjects(reset: false)
    }
}

// MARK: - AppGroupType + CustomStringConvertible

extension AppGroupType: CustomStringConvertible {
    public var description: String {
        AppGroup.name(for: self)
    }
}

Messung
CHZG
100979898

¤ Dauer der Verarbeitung: 0.2 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover


Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.