Fix expand focused attachment animation not working

This commit is contained in:
Shadowfacts 2023-05-16 13:02:28 -04:00
parent a309b041bf
commit 4b16a69275
1 changed files with 4 additions and 2 deletions

View File

@ -339,8 +339,10 @@ public final class ComposeController: ViewController {
}, message: { error in }, message: { error in
Text(error.localizedDescription) Text(error.localizedDescription)
}) })
.matchedGeometryPresentation(id: Binding(get: { .matchedGeometryPresentation(id: Binding(get: { () -> UUID?? in
controller.focusedAttachment?.0.id let id = controller.focusedAttachment?.0.id
// this needs to be a double optional, since the type used for for the presentationID in the geom source is a UUID?
return id.map { Optional.some($0) }
}, set: { }, set: {
if $0 == nil { if $0 == nil {
controller.focusedAttachment = nil controller.focusedAttachment = nil