File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri " : patch
3+ ---
4+
5+ Updated ` wry ` , fixing an issue with the draggable region.
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ thiserror = "1.0.24"
2828once_cell = " 1.7.2"
2929tauri-macros = { version = " 1.0.0-beta-rc.0" , path = " ../tauri-macros" }
3030tauri-utils = { version = " 1.0.0-beta-rc.0" , path = " ../tauri-utils" }
31- wry = " 0.7 "
31+ wry = " 0.8 "
3232rand = " 0.8"
3333reqwest = { version = " 0.11" , features = [ " json" , " multipart" ] }
3434tempfile = " 3"
Original file line number Diff line number Diff line change @@ -273,7 +273,9 @@ impl Dispatch for WryDispatcher {
273273 . add_window_with_configs (
274274 attributes,
275275 rpc_handler,
276- custom_protocol. map ( create_custom_protocol) ,
276+ custom_protocol
277+ . map ( create_custom_protocol)
278+ . unwrap_or_default ( ) ,
277279 file_drop_handler,
278280 )
279281 . map_err ( |_| crate :: Error :: CreateWebview ) ?;
@@ -480,7 +482,9 @@ impl Runtime for Wry {
480482 . add_window_with_configs (
481483 attributes,
482484 rpc_handler,
483- custom_protocol. map ( create_custom_protocol) ,
485+ custom_protocol
486+ . map ( create_custom_protocol)
487+ . unwrap_or_default ( ) ,
484488 file_drop_handler,
485489 )
486490 . map_err ( |_| crate :: Error :: CreateWebview ) ?;
@@ -540,11 +544,11 @@ fn create_file_drop_handler<M: Params<Runtime = Wry>>(
540544}
541545
542546/// Create a wry custom protocol from a tauri custom protocol.
543- fn create_custom_protocol ( custom_protocol : CustomProtocol ) -> wry:: CustomProtocol {
544- wry:: CustomProtocol {
547+ fn create_custom_protocol ( custom_protocol : CustomProtocol ) -> Vec < wry:: CustomProtocol > {
548+ vec ! [ wry:: CustomProtocol {
545549 name: custom_protocol. name. clone( ) ,
546550 handler: Box :: new( move |data| {
547551 ( custom_protocol. handler) ( data) . map_err( |_| wry:: Error :: InitScriptError )
548552 } ) ,
549- }
553+ } ]
550554}
You can’t perform that action at this time.
0 commit comments