Skip to content

Commit 1c66b25

Browse files
committed
Repo // Specify scrollability for StaggeredGrids.
1 parent d99d022 commit 1c66b25

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Packages/EnkaKit/Sources/EnkaKit/EnkaKitFrontend/CharacterIconViews/SpecimenView/AllIconSpecimenView_PerGame.swift

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ public struct CharSpecimen: Identifiable, Hashable {
4141
-> some View {
4242
let specimens = Self.allSpecimens(for: game, supplementalIDs: supplementalIDs?())
4343
let inner = StaggeredGrid(
44-
columns: columns, outerPadding: false, scroll: scroll, list: specimens
44+
columns: columns,
45+
showsIndicators: !scroll,
46+
outerPadding: false,
47+
scroll: scroll,
48+
list: specimens
4549
) { specimen in
4650
specimen.render(size: size, cutType: cutType)
4751
.matchedGeometryEffect(id: specimen.id, in: animation)

Packages/WallpaperKit/Sources/WallpaperKit/WallpaperGallaryView.swift

+6-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ public struct WallpaperGalleryViewContent: View {
6262
}
6363

6464
@ViewBuilder var coreBodyView: some View {
65-
StaggeredGrid(columns: columns, list: searchResults, content: { currentCard in
65+
StaggeredGrid(
66+
columns: columns,
67+
showsIndicators: true,
68+
list: searchResults
69+
) { currentCard in
6670
draw(wallpaper: currentCard)
6771
.matchedGeometryEffect(id: currentCard.id, in: animation)
6872
.contextMenu {
@@ -87,7 +91,7 @@ public struct WallpaperGalleryViewContent: View {
8791
}
8892
#endif
8993
}
90-
})
94+
}
9195
.searchable(text: $searchText, placement: searchFieldPlacement)
9296
.padding(.horizontal)
9397
.animation(.easeInOut, value: columns)

0 commit comments

Comments
 (0)