@@ -7,8 +7,7 @@ use crate::{
77 shortcut:: ShortcutRegistry ,
88 webview:: { PendingWebview , WebviewInstance } ,
99} ;
10- use dioxus_core:: { consume_context, ScopeId , VirtualDom } ;
11- use dioxus_history:: History ;
10+ use dioxus_core:: VirtualDom ;
1211use std:: {
1312 cell:: { Cell , RefCell } ,
1413 collections:: HashMap ,
@@ -480,9 +479,6 @@ impl App {
480479
481480 #[ cfg( debug_assertions) ]
482481 fn persist_window_state ( & self ) {
483- use dioxus_core:: ScopeId ;
484- use dioxus_history:: History ;
485-
486482 if let Some ( webview) = self . webviews . values ( ) . next ( ) {
487483 let window = & webview. desktop_context . window ;
488484
@@ -518,17 +514,12 @@ impl App {
518514 return ;
519515 } ;
520516
521- let url = webview. dom . in_scope ( ScopeId :: ROOT , || {
522- consume_context :: < Rc < dyn History > > ( ) . current_route ( )
523- } ) ;
524-
525517 let state = PreservedWindowState {
526518 x,
527519 y,
528520 width : width. max ( 200 ) ,
529521 height : height. max ( 200 ) ,
530522 monitor : monitor_name. to_string ( ) ,
531- url : Some ( url) ,
532523 } ;
533524
534525 // Yes... I know... we're loading a file that might not be ours... but it's a debug feature
@@ -582,13 +573,6 @@ impl App {
582573 window. set_inner_size ( tao:: dpi:: PhysicalSize :: new ( size. 0 , size. 1 ) ) ;
583574 }
584575 }
585-
586- // Set the url if it exists
587- webview. dom . in_scope ( ScopeId :: ROOT , || {
588- if let Some ( url) = state. url {
589- consume_context :: < Rc < dyn History > > ( ) . replace ( url) ;
590- }
591- } )
592576 }
593577 }
594578 }
@@ -627,7 +611,6 @@ struct PreservedWindowState {
627611 width : u32 ,
628612 height : u32 ,
629613 monitor : String ,
630- url : Option < String > ,
631614}
632615
633616/// Return the location of a tempfile with our window state in it such that we can restore it later
0 commit comments