Skip to content

Commit

Permalink
fix: tray panel is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
reyamir committed Jul 19, 2024
1 parent 07ce253 commit bdf3ffd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src-tauri/src/nostr/keys.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use crate::commands::tray::create_tray_panel;
use crate::nostr::event::RichEvent;
use crate::nostr::internal::{get_user_settings, init_nip65};
use crate::nostr::utils::parse_event;
use crate::{Nostr, NEWSFEED_NEG_LIMIT, NOTIFICATION_NEG_LIMIT};

use keyring::Entry;
use keyring_search::{Limit, List, Search};
use nostr_sdk::prelude::*;
Expand Down Expand Up @@ -199,6 +201,10 @@ pub async fn load_account(
// Connect to user's relay (NIP-65)
init_nip65(client).await;

// Create tray (macOS)
#[cfg(target_os = "macos")]
create_tray_panel(npub, &handle);

// Get user's contact list
if let Ok(contacts) = client.get_contact_list(None).await {
*state.contact_list.lock().unwrap() = contacts
Expand Down
6 changes: 6 additions & 0 deletions src-tauri/tauri.macos.conf.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
"app": {
"trayIcon": {
"id": "main",
"iconPath": "./icons/tray.png",
"iconAsTemplate": true,
"menuOnLeftClick": false
},
"windows": [
{
"title": "Lume",
Expand Down

0 comments on commit bdf3ffd

Please sign in to comment.