Skip to content

Commit

Permalink
fix: app crash error report dialog not coming in mac
Browse files Browse the repository at this point in the history
  • Loading branch information
abose committed Jul 24, 2024
1 parent 6d6a195 commit b515f73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dialog = "0.3.0"
objc = "0.2.7"
tauri-plugin-deep-link = "0.1.2"
lazy_static = "1.4"
dialog = "0.3.0"
native-dialog = "0.7.0"

[features]
# by default Tauri runs in production mode
Expand Down
8 changes: 4 additions & 4 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ extern crate objc;

use clipboard_files;

#[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(target_os = "linux")]
use dialog::DialogBox;

#[cfg(target_os = "windows")]
#[cfg(any(target_os = "macos", target_os = "windows"))]
use native_dialog::{MessageDialog, MessageType};

use regex::Regex;
Expand Down Expand Up @@ -285,7 +285,7 @@ fn main() {
);

let mut should_log_to_bugsnag = false;
#[cfg(any(target_os = "macos", target_os = "linux"))]
#[cfg(target_os = "linux")]
{
let choice = dialog::Question::new(&error_message)
.title("Oops! Phoenix Code Crashed :(")
Expand All @@ -296,7 +296,7 @@ fn main() {
}
}

#[cfg(target_os = "windows")]
#[cfg(any(target_os = "macos", target_os = "windows"))]
{
should_log_to_bugsnag = MessageDialog::new()
.set_type(MessageType::Error)
Expand Down

0 comments on commit b515f73

Please sign in to comment.