feat: adapt latest changes in tauri v2
This commit is contained in:
7
src-tauri/Cargo.lock
generated
7
src-tauri/Cargo.lock
generated
@@ -5406,8 +5406,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-plugin-decorum"
|
||||
version = "0.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fccbcf16f789b3fb01470511cbed050d98803d7580bdd55f53f8ef6d8737e8f1"
|
||||
source = "git+https://github.com/reyamir/tauri-plugin-decorum?branch=feat/tauri-v2#d19a643f8574c8f6ba9f5793672d7baaf05ba001"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cocoa",
|
||||
@@ -5663,7 +5662,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-specta"
|
||||
version = "2.0.0-rc.11"
|
||||
source = "git+https://github.com/oscartbeaumont/tauri-specta#a49885967adc01c80e33962e3ecac25fe7497839"
|
||||
source = "git+https://github.com/reyamir/tauri-specta?branch=feat/tauri-v2#5c09319b345814bfce3c4c02527e481d18339051"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"indoc",
|
||||
@@ -5678,7 +5677,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "tauri-specta-macros"
|
||||
version = "2.0.0-rc.5"
|
||||
source = "git+https://github.com/oscartbeaumont/tauri-specta#a49885967adc01c80e33962e3ecac25fe7497839"
|
||||
source = "git+https://github.com/reyamir/tauri-specta?branch=feat/tauri-v2#5c09319b345814bfce3c4c02527e481d18339051"
|
||||
dependencies = [
|
||||
"heck 0.5.0",
|
||||
"proc-macro2",
|
||||
|
||||
@@ -33,11 +33,11 @@ tauri-plugin-process = { git = "https://github.com/tauri-apps/plugins-workspace"
|
||||
tauri-plugin-shell = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-updater = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-plugin-upload = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v2" }
|
||||
tauri-specta = { git = "https://github.com/oscartbeaumont/tauri-specta", features = [
|
||||
tauri-specta = { git = "https://github.com/reyamir/tauri-specta", branch = "feat/tauri-v2", features = [
|
||||
"typescript",
|
||||
] }
|
||||
tauri-plugin-theme = "0.4.1"
|
||||
tauri-plugin-decorum = "0.1.3"
|
||||
tauri-plugin-decorum = { git = "https://github.com/reyamir/tauri-plugin-decorum", branch = "feat/tauri-v2" }
|
||||
specta = "^2.0.0-rc.12"
|
||||
keyring = "2"
|
||||
keyring-search = "0.2.0"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::ffi::CString;
|
||||
|
||||
use tauri::{AppHandle, Manager, WebviewWindow};
|
||||
use tauri::{AppHandle, Emitter, Listener, Manager, WebviewWindow};
|
||||
use tauri_nspanel::{
|
||||
block::ConcreteBlock,
|
||||
cocoa::{
|
||||
|
||||
@@ -5,7 +5,7 @@ use serde::Serialize;
|
||||
use specta::Type;
|
||||
use std::collections::HashSet;
|
||||
use std::time::Duration;
|
||||
use tauri::{EventTarget, Manager, State};
|
||||
use tauri::{Emitter, EventTarget, Manager, State};
|
||||
use tauri_plugin_notification::NotificationExt;
|
||||
|
||||
use crate::commands::tray::create_tray_panel;
|
||||
|
||||
@@ -39,7 +39,8 @@ pub async fn get_relays(state: State<'_, Nostr>) -> Result<Relays, String> {
|
||||
match client.get_events_of(vec![filter], None).await {
|
||||
Ok(events) => {
|
||||
if let Some(event) = events.first() {
|
||||
let nip65_list = nip65::extract_relay_list(event);
|
||||
let nip65_list = nip65::extract_relay_list(event).collect::<Vec<_>>();
|
||||
|
||||
let read = nip65_list
|
||||
.iter()
|
||||
.filter_map(|(url, meta)| {
|
||||
@@ -50,6 +51,7 @@ pub async fn get_relays(state: State<'_, Nostr>) -> Result<Relays, String> {
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
let write = nip65_list
|
||||
.iter()
|
||||
.filter_map(|(url, meta)| {
|
||||
@@ -60,6 +62,7 @@ pub async fn get_relays(state: State<'_, Nostr>) -> Result<Relays, String> {
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
let both = nip65_list
|
||||
.iter()
|
||||
.filter_map(|(url, meta)| {
|
||||
|
||||
Reference in New Issue
Block a user