about summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2019-12-21 16:21:25 +0100
committerDrew DeVault <sir@cmpwn.com>2019-12-21 11:20:11 -0500
commit2705d8460d7e974ee01ad41ce063ae3feeb30317 (patch)
treee09bec2089b49a6bee7a0cf31c1f2fe4e04da542 /widgets
parent709d4e1e5951e8bdf5cb4638f4d0995a8a053dc7 (diff)
downloadaerc-2705d8460d7e974ee01ad41ce063ae3feeb30317.tar.gz
add LabelList event
Diffstat (limited to 'widgets')
-rw-r--r--widgets/account.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/widgets/account.go b/widgets/account.go
index bf3f617..404a9ea 100644
--- a/widgets/account.go
+++ b/widgets/account.go
@@ -23,6 +23,7 @@ type AccountView struct {
 	aerc    *Aerc
 	conf    *config.AercConfig
 	dirlist *DirectoryList
+	labels  []string
 	grid    *ui.Grid
 	host    TabHost
 	logger  *log.Logger
@@ -169,6 +170,10 @@ func (acct *AccountView) Directories() *DirectoryList {
 	return acct.dirlist
 }
 
+func (acct *AccountView) Labels() []string {
+	return acct.labels
+}
+
 func (acct *AccountView) Messages() *MessageList {
 	return acct.msglist
 }
@@ -257,6 +262,8 @@ func (acct *AccountView) onMessage(msg types.WorkerMessage) {
 		if store, ok := acct.dirlist.SelectedMsgStore(); ok {
 			store.Update(msg)
 		}
+	case *types.LabelList:
+		acct.labels = msg.Labels
 	case *types.Error:
 		acct.logger.Printf("%v", msg.Error)
 		acct.host.SetStatus(fmt.Sprintf("%v", msg.Error)).