Ariver
2026-05-18 9d6f138e40a5322ee731f8096eaa3332c94a6532
Apptag/PreferencesView.swift
@@ -140,7 +140,7 @@
        isApplyingSystemScheme = true
        DispatchQueue.global(qos: .userInitiated).async {
            let scannedApps = AppIndexer.scan()
            let scannedApps = AppIndexer.scan(useCache: false)
            let result = SmartStartService.applySystemInitialScheme(apps: scannedApps)
            let store = result.store
            let apps = TagEditor.annotate(apps: scannedApps, store: store)
@@ -217,6 +217,25 @@
    private var canRestorePreviousScheme: Bool {
        guard let path = categoryScheme.previousBackupPath else { return false }
        return FileManager.default.fileExists(atPath: path)
    }
    private func bubbleScopeOption(
        _ title: String,
        isSelected: Bool,
        action: @escaping () -> Void
    ) -> some View {
        Button(action: action) {
            HStack(spacing: 6) {
                Image(systemName: isSelected ? "largecircle.fill.circle" : "circle")
                    .font(.system(size: 13, weight: .medium))
                    .frame(width: 16, height: 16)
                Text(title)
                    .font(.system(size: 13, weight: .medium))
            }
            .foregroundStyle(isSelected ? Color.accentColor : Color.primary)
            .contentShape(Rectangle())
        }
        .buttonStyle(.plain)
    }
    private func syncSelectedLanguage() {
@@ -465,7 +484,6 @@
                    onRefresh: { scanApps() }
                )
            }
            .padding(.leading, 16)
            .tabItem { Label(tr("settings.tags"), systemImage: "tag.fill") }
            .onAppear { scanApps() }
@@ -580,15 +598,28 @@
                Spacer(minLength: 22)
                VStack(alignment: .leading, spacing: 5) {
                    Toggle(tr("settings.uncommonBubble"), isOn: $showUncommonAppBubbles)
                HStack(alignment: .center, spacing: 14) {
                    Text(tr("settings.bubbleDisplayScope"))
                        .font(.system(size: 13, weight: .medium))
                    Text(tr("settings.uncommonBubbleDesc"))
                        .font(.caption)
                        .foregroundStyle(.secondary)
                        .fixedSize(horizontal: false, vertical: true)
                        .frame(width: 190, alignment: .trailing)
                    HStack(spacing: 20) {
                        bubbleScopeOption(
                            tr("settings.bubbleAllApps"),
                            isSelected: !showUncommonAppBubbles
                        ) {
                            showUncommonAppBubbles = false
                        }
                        bubbleScopeOption(
                            tr("settings.bubbleUncommonOnly"),
                            isSelected: showUncommonAppBubbles
                        ) {
                            showUncommonAppBubbles = true
                        }
                    }
                    .frame(width: 300, alignment: .leading)
                }
                .frame(width: 420, alignment: .leading)
                .frame(width: 520, alignment: .center)
                Spacer(minLength: 18)
            }