Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Open an iCloud Drive folder without animating its rows

Țugui Dragoș1ab865e31996
diff --git a/Peel/Views/Cloud/CloudFolderRow.swift b/Peel/Views/Cloud/CloudFolderRow.swift
index 338de807..8ebb9e60 100644
--- a/Peel/Views/Cloud/CloudFolderRow.swift
+++ b/Peel/Views/Cloud/CloudFolderRow.swift
@@ -29,14 +29,15 @@ struct CloudFolderRow: View {
isMixed: group == .some
)
.disabled(rows.clickingGroup(in: selected) == selected)
- Button {
- withAnimation(reduceMotion ? nil : Motion.step.animation) { toggleOpen() }
- } label: {
+ // Only the chevron is animated: rows a list inserts in an animation that shows or hides the scroll bar
+ // leave AppKit's table wider than the list, and the section header with it.
+ Button(action: toggleOpen) {
HStack(alignment: .firstTextBaseline, spacing: Self.spacing) {
Image(systemName: "chevron.right")
.font(.caption.weight(.bold))
.foregroundStyle(.secondary)
.rotationEffect(.degrees(isOpen ? 90 : 0))
+ .animation(reduceMotion ? nil : Motion.step.animation, value: isOpen)
.frame(width: Self.chevronWidth)
AppIcon(url: folder.url)
.frame(width: 18, height: 18)