Revert "Show spinner when fetching contents"
This reverts commit 1339faf788
.
This commit is contained in:
parent
d3379dd7f0
commit
f1b365dfc3
2 changed files with 3 additions and 9 deletions
|
@ -11,10 +11,9 @@ import (
|
||||||
|
|
||||||
// Accesses to fields must be guarded by MessageStore.Lock/Unlock
|
// Accesses to fields must be guarded by MessageStore.Lock/Unlock
|
||||||
type MessageStore struct {
|
type MessageStore struct {
|
||||||
Deleted map[uint32]interface{}
|
Deleted map[uint32]interface{}
|
||||||
DirInfo models.DirectoryInfo
|
DirInfo models.DirectoryInfo
|
||||||
Messages map[uint32]*models.MessageInfo
|
Messages map[uint32]*models.MessageInfo
|
||||||
FetchingContents bool
|
|
||||||
// Ordered list of known UIDs
|
// Ordered list of known UIDs
|
||||||
uids []uint32
|
uids []uint32
|
||||||
|
|
||||||
|
@ -161,7 +160,6 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
|
||||||
store.worker.PostAction(&types.FetchDirectoryContents{
|
store.worker.PostAction(&types.FetchDirectoryContents{
|
||||||
SortCriteria: store.defaultSortCriteria,
|
SortCriteria: store.defaultSortCriteria,
|
||||||
}, nil)
|
}, nil)
|
||||||
store.FetchingContents = true
|
|
||||||
update = true
|
update = true
|
||||||
case *types.DirectoryContents:
|
case *types.DirectoryContents:
|
||||||
newMap := make(map[uint32]*models.MessageInfo)
|
newMap := make(map[uint32]*models.MessageInfo)
|
||||||
|
@ -175,7 +173,6 @@ func (store *MessageStore) Update(msg types.WorkerMessage) {
|
||||||
}
|
}
|
||||||
store.Messages = newMap
|
store.Messages = newMap
|
||||||
store.uids = msg.Uids
|
store.uids = msg.Uids
|
||||||
store.FetchingContents = false
|
|
||||||
update = true
|
update = true
|
||||||
case *types.MessageInfo:
|
case *types.MessageInfo:
|
||||||
if existing, ok := store.Messages[msg.Info.Uid]; ok && existing != nil {
|
if existing, ok := store.Messages[msg.Info.Uid]; ok && existing != nil {
|
||||||
|
|
|
@ -61,9 +61,6 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
|
||||||
ml.drawEmptyMessage(ctx)
|
ml.drawEmptyMessage(ctx)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else if store.FetchingContents {
|
|
||||||
ml.spinner.Draw(ctx)
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
Loading…
Reference in a new issue