Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/helloworld/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"tauri": "tauri"
},
"dependencies": {
"@tauri-apps/api": "^2.1.1",
"@tauri-apps/api": "^2.7.0",
"@aptabase/tauri": "file:../../"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"typescript": "^5.7.2"
},
"dependencies": {
"@tauri-apps/api": "^2.1.1",
"@tauri-apps/api": "^2.7.0",
"tslib": "^2.8.1"
}
}
2 changes: 1 addition & 1 deletion src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl AptabaseClient {
pub(crate) fn start_polling(&self, interval: Duration) {
let dispatcher = self.dispatcher.clone();

tokio::spawn(async move {
tauri::async_runtime::spawn(async move {
loop {
tokio::time::sleep(interval).await;
dispatcher.flush().await;
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ mod config;
mod dispatcher;
mod sys;

use std::{panic::PanicInfo, sync::Arc, time::Duration};
use std::{panic::PanicHookInfo, sync::Arc, time::Duration};

use client::AptabaseClient;
use config::Config;
Expand All @@ -28,9 +28,9 @@ pub struct Builder {
}

pub type PanicHook =
Box<dyn Fn(&AptabaseClient, &PanicInfo<'_>, String) + 'static + Sync + Send>;
Box<dyn Fn(&AptabaseClient, &PanicHookInfo<'_>, String) + 'static + Sync + Send>;

fn get_panic_message(info: &PanicInfo) -> String {
fn get_panic_message(info: &PanicHookInfo) -> String {
let payload = info.payload();
if let Some(s) = payload.downcast_ref::<&str>() {
return s.to_string();
Expand Down