From 9570f4b4d0cdf525ce1695971636a0b58f1a091b Mon Sep 17 00:00:00 2001 From: Reto Brunner Date: Wed, 31 Jul 2019 09:50:07 +0200 Subject: msglist: add initialization state Make the msglist aware of whether we are still initializing or not. We never stopped spinning the msglist if we didn't get any Directories back from types.ListDirectories. With this change, we can set the init state from the account and display the spinner only if we don't know whether we have directories or not and else the "no messages" string from the config. --- widgets/account.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'widgets/account.go') diff --git a/widgets/account.go b/widgets/account.go index de81ab8..07b5010 100644 --- a/widgets/account.go +++ b/widgets/account.go @@ -147,6 +147,8 @@ func (acct *AccountView) connected(msg types.WorkerMessage) { if dir != "" { acct.dirlist.Select(dir) } + + acct.msglist.SetInitDone() acct.logger.Println("Connected.") acct.host.SetStatus("Connected.") }) -- cgit v1.2.3