aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/account.go
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2019-06-12 08:31:52 +0200
committerDrew DeVault <sir@cmpwn.com>2019-06-14 10:42:26 -0400
commit99c363b7249d52d484b736ef24dbc5bff70b86ae (patch)
tree51b3098091933e255e954fcc13bb25b1dbbfd378 /widgets/account.go
parent626f91c4832c097b7036d5063b2f0491397a9c70 (diff)
downloadaerc-99c363b7249d52d484b736ef24dbc5bff70b86ae.tar.gz
Set empty message in dirlist if no folder exist.
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 397cccde..824f958e 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.")
})