summary refs log tree commit diff stats
path: root/widgets/account.go
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/account.go')
-rw-r--r--widgets/account.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/widgets/account.go b/widgets/account.go
index 397cccd..824f958 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -47,7 +47,7 @@ func NewAccountView(conf *config.AercConfig, acct *config.AccountConfig,
 		}
 	}
 
-	dirlist := NewDirectoryList(acct, logger, worker)
+	dirlist := NewDirectoryList(acct, &conf.Ui, logger, worker)
 	if conf.Ui.SidebarWidth > 0 {
 		grid.AddChild(ui.NewBordered(dirlist, ui.BORDER_RIGHT))
 	}
@@ -144,7 +144,9 @@ func (acct *AccountView) connected(msg types.WorkerMessage) {
 			if dir == "" && len(dirs) > 0 {
 				dir = dirs[0]
 			}
-			acct.dirlist.Select(dir)
+			if dir != "" {
+				acct.dirlist.Select(dir)
+			}
 			acct.logger.Println("Connected.")
 			acct.host.SetStatus("Connected.")
 		})