Files
suixinkan_ios_new/suixinkan/Features/Home/Services/HomeCommonMenuDiagnostics.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

34 lines
1.1 KiB
Swift
Raw Permalink 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.

//
// HomeCommonMenuDiagnostics.swift
// suixinkan
//
// Created by Codex on 2026/6/30.
//
import Foundation
import os
/// Android `HomeCommonMenu` tag
enum HomeCommonMenuDiagnostics {
private static let logger = Logger(subsystem: "com.yuanzhixiang.suixinkan", category: "HomeCommonMenu")
/// 线
static func log(step: String, fields: [String: String]) {
#if DEBUG
let payload = fields.map { "\($0.key)=\($0.value)" }.joined(separator: " ")
logger.debug("step=\(step, privacy: .public) \(payload, privacy: .public)")
#endif
}
/// URI
static func formatURIList(_ uris: [String]) -> String {
"[\(uris.joined(separator: ","))]"
}
/// title|uri
static func formatDisplayItems(_ items: [(title: String, uri: String)]) -> String {
let labels = items.map { "\($0.title)|\($0.uri)" }
return "[\(labels.joined(separator: ","))]"
}
}