From 16ee4576a9ff3c4f91cc30cb4cedbfb41fb3de14 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Thu, 18 Jun 2026 20:50:58 +0800
Subject: [PATCH] Record UI implementation lesson
---
C1.source/Sources/Aligner/QuickSwitchSnapshotLoader.swift | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/C1.source/Sources/Aligner/QuickSwitchSnapshotLoader.swift b/C1.source/Sources/Aligner/QuickSwitchSnapshotLoader.swift
index 1cce8b6..121e38f 100644
--- a/C1.source/Sources/Aligner/QuickSwitchSnapshotLoader.swift
+++ b/C1.source/Sources/Aligner/QuickSwitchSnapshotLoader.swift
@@ -17,6 +17,7 @@
case activation
case spaceFilter
case splitView
+ case multiPageIdentity
}
final class LiveQuickSwitchSnapshotLoader: QuickSwitchSnapshotLoading {
@@ -91,6 +92,9 @@
}
if mode == .splitView {
return splitViewSnapshot()
+ }
+ if mode == .multiPageIdentity {
+ return multiPageIdentitySnapshot()
}
return layoutSnapshot()
@@ -578,4 +582,53 @@
currentSpaceIDs: [1]
)
}
+
+ private func multiPageIdentitySnapshot() -> QuickSwitchSnapshotLoad {
+ let displayUUID = "fixture-display-a"
+ let displays = [
+ AlignerDisplay(
+ uuid: displayUUID,
+ physical: true,
+ spaces: [
+ AlignerSpace(id: 1, type: .user, displayUUID: displayUUID, index: 1)
+ ]
+ )
+ ]
+
+ let app = AlignerApp(
+ bundleIdentifier: "com.example.multipage.identity",
+ name: "Multi Page App",
+ category: .generic,
+ processIdentifier: 70_001
+ )
+
+ let windows = [
+ AlignerWindow(
+ id: 70_101,
+ app: app,
+ title: "Shared Page",
+ frame: CGRect(x: 120, y: 120, width: 920, height: 640),
+ spaceIDs: [1]
+ ),
+ AlignerWindow(
+ id: 70_102,
+ app: app,
+ title: "Shared Page",
+ frame: CGRect(x: 160, y: 140, width: 920, height: 640),
+ spaceIDs: [1]
+ ),
+ AlignerWindow(
+ id: 70_103,
+ app: app,
+ title: "Shared Page",
+ frame: CGRect(x: 200, y: 160, width: 920, height: 640),
+ spaceIDs: [1]
+ )
+ ]
+
+ return QuickSwitchSnapshotLoad(
+ snapshot: QuickSwitchSnapshotBuilder.snapshot(displays: displays, windows: windows),
+ currentSpaceIDs: [1]
+ )
+ }
}
--
Gitblit v1.9.3