From c4175bfa703ef299938a10ca8ed50be35c873632 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 19 Apr 2020 18:56:36 +0300 Subject: Only show syncing modal for initial syncs --- matrix/matrix.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'matrix/matrix.go') diff --git a/matrix/matrix.go b/matrix/matrix.go index b360c56..617bbd5 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -331,12 +331,15 @@ func (c *Container) OnLogin() { c.syncer.OnEventType(event.AccountDataPushRules, c.HandlePushRules) c.syncer.OnEventType(event.AccountDataRoomTags, c.HandleTag) c.syncer.OnEventType(AccountDataGomuksPreferences, c.HandlePreferences) - c.syncer.Progress = c.ui.MainView().OpenSyncingModal() - c.syncer.Progress.SetMessage("Waiting for /sync response from server") - c.syncer.Progress.SetIndeterminate() - c.syncer.FirstDoneCallback = func() { - c.syncer.Progress.Close() - c.syncer.Progress = StubSyncingModal{} + if len(c.config.AuthCache.NextBatch) == 0 { + c.syncer.Progress = c.ui.MainView().OpenSyncingModal() + c.syncer.Progress.SetMessage("Waiting for /sync response from server") + c.syncer.Progress.SetIndeterminate() + c.syncer.FirstDoneCallback = func() { + c.syncer.Progress.Close() + c.syncer.Progress = StubSyncingModal{} + c.syncer.FirstDoneCallback = nil + } } c.syncer.InitDoneCallback = func() { debug.Print("Initial sync done") -- cgit v1.2.3