Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ internal class MethodCallHandler(
isWithResult,
)

manager.signalShareSheetCalledBack()
if (!isWithResult) {
if (isResultRequested) {
result.success("dev.fluttercommunity.plus/share/unavailable")
Expand All @@ -62,6 +63,7 @@ internal class MethodCallHandler(
isWithResult,
)

manager.signalShareSheetCalledBack()
if (!isWithResult) {
if (isResultRequested) {
result.success("dev.fluttercommunity.plus/share/unavailable")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ internal class ShareSuccessManager(private val context: Context) : ActivityResul
}
}

/**
* Set the `isCalledBack` to `true`. Must be called in every share-sheet calling method
* before returning.
*/
fun signalShareSheetCalledBack(){
isCalledBack.set(true)
}

/**
* Must be called if `.startActivityForResult` is not available to avoid deadlocking.
*/
Expand Down