From 314ebb285d11caad11482885769402df80c45391 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 18 Feb 2026 12:26:07 -0800 Subject: perf: eliminate repeated favorites sort map and grid recompute --- Sora/Views/Shared/ThumbnailGridView.swift | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Sora/Views/Shared/ThumbnailGridView.swift (limited to 'Sora/Views/Shared') diff --git a/Sora/Views/Shared/ThumbnailGridView.swift b/Sora/Views/Shared/ThumbnailGridView.swift new file mode 100644 index 0000000..a7130c2 --- /dev/null +++ b/Sora/Views/Shared/ThumbnailGridView.swift @@ -0,0 +1,45 @@ +import SwiftUI +import WaterfallGrid + +struct ThumbnailGridView: View { + let items: [Item] + let columnCount: Int + let useAlternativeGrid: Bool + let columnsData: [[Item]] + let content: (Item) -> Content + + var body: some View { + if useAlternativeGrid { + HStack(alignment: .top) { + ForEach(0..