File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed
Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ use std::fs;
1919use base64:: { engine:: general_purpose:: STANDARD as b64engine, Engine as _} ;
2020use font_loader:: system_fonts;
2121use lava_torrent:: torrent:: v1:: Torrent ;
22- use tauri:: { Emitter , Manager , State } ;
22+ use tauri:: { Emitter , EventTarget , State } ;
2323
2424use crate :: {
2525 createtorrent:: { CreateCheckResult , CreationRequestsHandle , TorrentCreateInfo } ,
@@ -268,15 +268,14 @@ pub async fn pass_to_window(
268268 to : String ,
269269 payload : String ,
270270) {
271- if let Some ( dest) = app_handle. get_webview_window ( to. as_str ( ) ) {
272- let _ = dest. emit (
273- "pass-from-window" ,
274- PassEventData {
275- from : window. label ( ) . to_string ( ) ,
276- payload,
277- } ,
278- ) ;
279- }
271+ let _ = app_handle. emit_to (
272+ EventTarget :: window ( to. as_str ( ) ) ,
273+ "pass-from-window" ,
274+ PassEventData {
275+ from : window. label ( ) . to_string ( ) ,
276+ payload,
277+ } ,
278+ ) ;
280279}
281280
282281#[ tauri:: command]
Original file line number Diff line number Diff line change @@ -120,9 +120,7 @@ fn setup(app: &mut App) -> Result<(), Box<dyn std::error::Error>> {
120120 let listener_lock = listener_lock2. clone ( ) ;
121121 async_runtime:: spawn ( async move {
122122 let mut listener = listener_lock. write ( ) . await ;
123- println ! ( "Grabbed listener lock to pause" ) ;
124123 listener. pause ( ) . await ;
125- println ! ( "Listener lock to pause released" ) ;
126124 } ) ;
127125 } ) ;
128126 tray:: toggle_main_window ( & app, None ) ;
You can’t perform that action at this time.
0 commit comments