From cce7cb48081ca090ac2d3a0e781dfbc25d581946 Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Sun, 7 Jul 2019 22:43:56 -0400 Subject: Factor UI models out of the worker message package Before, the information needed to display different parts of the UI was tightly coupled to the specific messages being sent back and forth to the backend worker. Separating out a models package allows us to be more specific about exactly what a backend is able to and required to provide for the UI. --- widgets/dirlist.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'widgets/dirlist.go') diff --git a/widgets/dirlist.go b/widgets/dirlist.go index 4dc8fd2c..c5e4a0c0 100644 --- a/widgets/dirlist.go +++ b/widgets/dirlist.go @@ -55,7 +55,7 @@ func (dirlist *DirectoryList) UpdateList(done func(dirs []string)) { switch msg := msg.(type) { case *types.Directory: - dirs = append(dirs, msg.Name) + dirs = append(dirs, msg.Dir.Name) case *types.Done: sort.Strings(dirs) dirlist.store.Update(dirs) -- cgit