File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -93,7 +93,11 @@ async fn main() -> Result<()> {
9393 // Check if tray is enabled in config
9494 let enable_tray = config. read ( ) . await . daemon . enable_tray ;
9595 let initial_tray = if enable_tray {
96- let repo_count = config. read ( ) . await . repositories . len ( ) ;
96+ let cfg = config. read ( ) . await ;
97+ let repo_count = cfg. repositories . len ( ) ;
98+ let check_interval = cfg. daemon . check_interval_seconds ;
99+ drop ( cfg) ;
100+
97101 let tray = tray:: AutogitTray :: new ( repo_count, tray_action_tx. clone ( ) , suspended. clone ( ) ) ;
98102 match tray. spawn_tray ( ) . await {
99103 Ok ( handle) => {
@@ -102,7 +106,7 @@ async fn main() -> Result<()> {
102106 }
103107 Err ( e) => {
104108 warn ! ( "Failed to spawn system tray icon (no desktop environment?): {:#}" , e) ;
105- warn ! ( "Daemon will continue without tray icon" ) ;
109+ warn ! ( "Will retry tray initialization up to 3 times (every {} seconds)" , check_interval ) ;
106110 None
107111 }
108112 }
You can’t perform that action at this time.
0 commit comments