summary refs log tree commit diff stats
path: root/widgets/account.go
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2019-07-31 09:50:07 +0200
committerDrew DeVault <sir@cmpwn.com>2019-08-02 09:26:10 -0400
commit9570f4b4d0cdf525ce1695971636a0b58f1a091b (patch)
tree4a6d8773945d43ef8db4b8e8b298be306c822081 /widgets/account.go
parent04ccbd09b1f9369949b89b4815752d08a0ca9786 (diff)
downloadaerc-9570f4b4d0cdf525ce1695971636a0b58f1a091b.tar.gz
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.
Diffstat (limited to 'widgets/account.go')
-rw-r--r--widgets/account.go2
1 files changed, 2 insertions, 0 deletions
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.")
 		})