Skip to content

Commit 7a4d517

Browse files
committed
fix: disable 'explore archive contents' menu item on macOS for non-archives
Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl>
1 parent ce2b273 commit 7a4d517

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sushitrain/FileView.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ struct FileView: View {
183183
Button("Encryption details...", systemImage: "lock.document.fill") { showEncryptionSheet = true }
184184
.disabled(!(file.folder?.hasEncryptedPeers ?? false))
185185

186-
Button("Explore archive contents...", systemImage: "doc.zipper") { showArchive = true }
186+
Button("Explore archive contents...", systemImage: "doc.zipper") {
187+
showArchive = true
188+
}
189+
.disabled(!file.isArchive())
187190
} label: {
188191
Label("Advanced", systemImage: "ellipsis.circle")
189192
}

0 commit comments

Comments
 (0)