diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index ed9133dc..9b8738eb 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -337,19 +337,19 @@ fn main() { }); // Run local relay thread - tauri::async_runtime::spawn(async move { - let database = NostrLMDB::open(data_dir.join("local-relay")) - .expect("Error: cannot create database."); - let builder = RelayBuilder::default().database(database).port(1984); - - if let Ok(relay) = LocalRelay::run(builder).await { - println!("Running local relay: {}", relay.url()) - } - - loop { - tokio::time::sleep(Duration::from_secs(60)).await; - } - }); + //tauri::async_runtime::spawn(async move { + // let database = NostrLMDB::open(data_dir.join("local-relay")) + // .expect("Error: cannot create database."); + // let builder = RelayBuilder::default().database(database).port(1984); + // + // if let Ok(relay) = LocalRelay::run(builder).await { + // println!("Running local relay: {}", relay.url()) + // } + // + // loop { + // tokio::time::sleep(Duration::from_secs(60)).await; + // } + //}); // Run notification thread tauri::async_runtime::spawn(async move { diff --git a/src/components/reply.tsx b/src/components/reply.tsx index 87be27f6..6e9f775c 100644 --- a/src/components/reply.tsx +++ b/src/components/reply.tsx @@ -1,9 +1,10 @@ import { commands } from "@/commands.gen"; -import { cn, replyTime } from "@/commons"; +import { appSettings, cn, replyTime } from "@/commons"; import { Note } from "@/components/note"; import { type LumeEvent, LumeWindow } from "@/system"; import { CaretDown } from "@phosphor-icons/react"; import { Link, useSearch } from "@tanstack/react-router"; +import { useStore } from "@tanstack/react-store"; import { Menu, MenuItem } from "@tauri-apps/api/menu"; import { writeText } from "@tauri-apps/plugin-clipboard-manager"; import { memo, useCallback, useEffect, useState } from "react"; @@ -16,6 +17,7 @@ export const ReplyNote = memo(function ReplyNote({ event: LumeEvent; className?: string; }) { + const trustedOnly = useStore(appSettings, (state) => state.trusted_only); const search = useSearch({ strict: false }); const [isTrusted, setIsTrusted] = useState(null); @@ -52,11 +54,13 @@ export const ReplyNote = memo(function ReplyNote({ } } - check(); + if (trustedOnly) { + check(); + } }, []); if (isTrusted !== null && isTrusted === false) { - return
Not trusted
; + return null; } return ( diff --git a/src/routes/$account/_settings/general.lazy.tsx b/src/routes/$account/_settings/general.lazy.tsx index b54c0824..7749563d 100644 --- a/src/routes/$account/_settings/general.lazy.tsx +++ b/src/routes/$account/_settings/general.lazy.tsx @@ -61,6 +61,11 @@ function Screen() { description="Shows a warning for notes that have a content warning." label="content_warning" /> +
@@ -129,7 +134,7 @@ function Screen() {
-
+