Skip to content

Commit

Permalink
IOS-3509 Open non-visual files as objects
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatovv committed Oct 14, 2024
1 parent 1e87fda commit 59571b2
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,14 @@ final class BlockViewModelBuilder {
self?.showFilePicker(blockId: blockId)
},
onFileOpen: { [weak router] fileContext in
router?.openImage(fileContext)
switch fileContext.file.file.contentType {
case .video, .image:
router?.openImage(fileContext)
case .audio, .file:
router?.showPage(objectId: fileContext.file.file.metadata.targetObjectId)
case .none:
return
}
}
)
case .image:
Expand Down

0 comments on commit 59571b2

Please sign in to comment.