fix(share-menu): Fixes URL for shared status when using suare.and.arrow.up share menu on status
This commit is contained in:
parent
7041a81fcf
commit
35dfd13c96
|
@ -312,10 +312,16 @@ extension DataSourceFacade {
|
||||||
} // end Task
|
} // end Task
|
||||||
case .shareStatus:
|
case .shareStatus:
|
||||||
Task {
|
Task {
|
||||||
guard let status = menuContext.status else {
|
let managedObjectContext = dependency.context.managedObjectContext
|
||||||
|
guard let status: ManagedObjectRecord<Status> = try? await managedObjectContext.perform(block: {
|
||||||
|
guard let object = menuContext.status?.object(in: managedObjectContext) else { return nil }
|
||||||
|
let objectID = (object.reblog ?? object).objectID
|
||||||
|
return .init(objectID: objectID)
|
||||||
|
}) else {
|
||||||
assertionFailure()
|
assertionFailure()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let activityViewController = try await DataSourceFacade.createActivityViewController(
|
let activityViewController = try await DataSourceFacade.createActivityViewController(
|
||||||
dependency: dependency,
|
dependency: dependency,
|
||||||
status: status
|
status: status
|
||||||
|
|
Loading…
Reference in New Issue