fixed pending share race error on warm app start
This commit is contained in:
@@ -212,13 +212,18 @@ Future<void> _externalUploadFlow(
|
||||
screen: FilesUploadDialog(
|
||||
filePaths: share.filePaths,
|
||||
remotePath: targetPath.join('/'),
|
||||
onUploadFinished: (_) => _afterExternalUploaded(context, targetPath),
|
||||
onUploadFinished: (_) =>
|
||||
_afterExternalUploaded(context, targetPath, share),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _afterExternalUploaded(BuildContext context, List<String> targetPath) {
|
||||
ShareIntentListener.instance.clear();
|
||||
void _afterExternalUploaded(
|
||||
BuildContext context,
|
||||
List<String> targetPath,
|
||||
PendingShare share,
|
||||
) {
|
||||
ShareIntentListener.instance.clear(ifCurrent: share);
|
||||
if (!context.mounted) return;
|
||||
_finishWithFolder(context, targetPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user