mirror of
https://github.com/localsend/localsend.git
synced 2026-08-07 07:14:52 +00:00
fix: pop after multi send
This commit is contained in:
@@ -204,6 +204,18 @@ class _ProgressPageState extends State<ProgressPage> with Refena {
|
|||||||
final SessionState? commonSessionState = receiveSession ?? sendSession;
|
final SessionState? commonSessionState = receiveSession ?? sendSession;
|
||||||
|
|
||||||
if (commonSessionState == null) {
|
if (commonSessionState == null) {
|
||||||
|
// The session no longer exists, e.g. a multi-send session that finished successfully
|
||||||
|
// in background gets removed while this page is still open.
|
||||||
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
|
if (!mounted) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (ref.read(serverProvider)?.webUpload == true) {
|
||||||
|
context.global.dispatch(NavigateAction.popUntil<WebSharePage>());
|
||||||
|
} else {
|
||||||
|
context.global.dispatch(NavigateAction.popUntilRoot());
|
||||||
|
}
|
||||||
|
});
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Container(),
|
body: Container(),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user