summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/msgstore.go4
-rw-r--r--lib/statusline/state.go6
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/msgstore.go b/lib/msgstore.go
index dc18137..6774f59 100644
--- a/lib/msgstore.go
+++ b/lib/msgstore.go
@@ -193,7 +193,9 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
switch msg := msg.(type) {
case *types.DirectoryInfo:
store.DirInfo = *msg.Info
- store.Sort(store.sortCriteria, nil)
+ if !msg.SkipSort {
+ store.Sort(store.sortCriteria, nil)
+ }
update = true
case *types.DirectoryContents:
newMap := make(map[uint32]*models.MessageInfo)
diff --git a/lib/statusline/state.go b/lib/statusline/state.go
index 3fecd0f..54746fb 100644
--- a/lib/statusline/state.go
+++ b/lib/statusline/state.go
@@ -64,9 +64,13 @@ func (s *State) SetWidth(w int) bool {
return changeState
}
+func (s *State) Connected() bool {
+ return s.acct.Connected
+}
+
type SetStateFunc func(s *State, folder string)
-func Connected(state bool) SetStateFunc {
+func SetConnected(state bool) SetStateFunc {
return func(s *State, folder string) {
s.acct.ConnActivity = ""
s.acct.Connected = state