Files
suixinkan_ios_new/suixinkan/Features/Home/Services/HomeAllFunctionsDiagnostics.swift
汉秋 5692134efc Align iOS home common apps and all-functions page with Android.
Add unified HomeCommonMenu/HomeAllFunctions diagnostics, rebuild all-functions from top-level menuList permissions, and document Home and AllFunctions module logic.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-30 09:40:02 +08:00

30 lines
1.0 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// HomeAllFunctionsDiagnostics.swift
// suixinkan
//
// Created by Codex on 2026/6/30.
//
import Foundation
import os
/// 便 Android `AllFunctionsViewModel`
enum HomeAllFunctionsDiagnostics {
private static let logger = Logger(subsystem: "com.yuanzhixiang.suixinkan", category: "HomeAllFunctions")
/// URI
static func log(snapshot: HomeAllFunctionsSnapshot) {
#if DEBUG
log(step: "allFunctions", uris: snapshot.allFunctions.map(\.uri))
log(step: "commonFunctions", uris: snapshot.commonFunctions.map(\.uri))
log(step: "moreFunctions", uris: snapshot.moreFunctions.map(\.uri))
#endif
}
/// URI
private static func log(step: String, uris: [String]) {
let payload = "count=\(uris.count) uris=\(HomeCommonMenuDiagnostics.formatURIList(uris))"
logger.debug("step=\(step, privacy: .public) \(payload, privacy: .public)")
}
}