@@ -36,7 +36,7 @@ pub async fn ipc_open_system_preference_notifications() -> Response {
36
36
37
37
#[ cfg( target_os = "windows" ) ]
38
38
#[ command]
39
- pub async fn ipc_open_system_preference_notifications ( ) -> Result < String , String > {
39
+ pub async fn ipc_open_system_preference_notifications ( ) -> Response {
40
40
let methods = vec ! [
41
41
( "explorer" , vec![ "ms-settings:notifications" ] ) ,
42
42
( "start" , vec![ "ms-settings:notifications" ] ) ,
@@ -81,7 +81,7 @@ pub async fn ipc_open_system_preference_notifications() -> Result<String, String
81
81
82
82
#[ cfg( target_os = "linux" ) ]
83
83
#[ command]
84
- pub async fn ipc_open_system_preference_notifications ( ) -> Result < String , String > {
84
+ pub async fn ipc_open_system_preference_notifications ( ) -> Response {
85
85
// Detect desktop environment
86
86
let desktop_env = std:: env:: var ( "XDG_CURRENT_DESKTOP" )
87
87
. or_else ( |_| std:: env:: var ( "DESKTOP_SESSION" ) )
@@ -171,7 +171,7 @@ pub async fn ipc_open_system_preference_notifications() -> Result<String, String
171
171
172
172
#[ cfg( not( any( target_os = "macos" , target_os = "windows" , target_os = "linux" ) ) ) ]
173
173
#[ command]
174
- pub async fn ipc_open_system_preference_notifications ( ) -> Result < String , String > {
174
+ pub async fn ipc_open_system_preference_notifications ( ) -> Response {
175
175
Ok ( serde_json:: json!( {
176
176
"success" : false ,
177
177
"error" : "Opening system notification settings is not supported on this platform"
0 commit comments