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

Quelle  GroupCallUIHelper.swift   Sprache: JAVA

 

import CocoaLumberjackSwift
import Foundation
import GroupCalls
import ThreemaMacros

enum GroupCallUIHelper {
    static func newBannerForStartGroupCall(
        conversationManagedObjectID: NSManagedObjectID,
        title: String,
        body: String,
        identifier: String
    ) {
        // No toast if disabled
        if !UserSettings.shared().inAppPreview {
            return
        }

        let businessInjector = BusinessInjector.ui

        if !businessInjector.pushSettingManager.canMasterDndSendPush() {
            return
        }

        guard businessInjector.entityManager.performAndWait({
            if let conversation = businessInjector.entityManager.entityFetcher
                .managedObject(with: conversationManagedObjectID) as? ConversationEntity {
                if let group = businessInjector.groupManager.getGroup(conversation: conversation) {
                    // We show a notification anyways when notify when mentioned is set to true
                    if !group.pushSetting.mentioned, !group.pushSetting.canSendPush() {
                        return false
                    }
                }
            }

            return true
        }) else {
            return
        }

        // Is this for the currently visible conversation?
        Task { @MainActor in
            if let mainTabBar = SharedAppProvider.tabBarController,
               let viewControllers = mainTabBar.viewControllers {
                if viewControllers.count <= kChatTabBarIndex {
                    return
                }
                let chatNavVc = viewControllers[Int(kChatTabBarIndex)] as! UINavigationController
                if let curChatVc = chatNavVc.topViewController as? ChatViewController,
                   curChatVc.conversation.objectID == conversationManagedObjectID {
                    if UIAccessibility.isVoiceOverRunning,
                       !curChatVc.isRecording(),
                       !curChatVc.isPlayingAudioMessage() {
                        let accessibilityText =
                            "\(#localize("new_message_accessibility"))\(body)"
                        UIAccessibility.post(notification: .announcement, argument: accessibilityText)
                    }
                    return
                }
            }
            NotificationBannerHelper.newBannerForStartGroupCall(
                conversationManagedObjectID: conversationManagedObjectID,
                title: title,
                body: body,
                identifier: identifier
            )
        }
    }
}

Messung
CHZG
839710093

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-04) ¤

*© 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.