refactor: don't pass client directly to store syncer

This commit is contained in:
James Houlahan
2020-04-16 17:17:44 +02:00
parent 38f0425670
commit e95aece6d3
10 changed files with 71 additions and 76 deletions

View File

@ -144,8 +144,7 @@ func (store *Store) triggerSync() {
store.log.WithField("isIncomplete", syncState.isIncomplete()).Info("Store sync started")
// TODO: Is it okay to pass in a client directly? What if it is logged out in the meantime?
err := syncAllMail(store.panicHandler, store, store.client(), syncState)
err := syncAllMail(store.panicHandler, store, func() messageLister { return store.client() }, syncState)
if err != nil {
log.WithError(err).Error("Store sync failed")
return