Why is my Sync button blue?

Why is my sync button sometimes coloured a dark blue? Is this a feature and what is this indicating? Performing a sync does not change the colour, but an app restart does.

From the manual:

The sync button will change to blue when a normal sync is required, and red when a full sync is required.

1 Like

Ah thank you. I’ve actually searched the manual, but haven’t found the answer.

The colour should change after a sync. If you can reproduce the issue without add-ons, please let me know under which circumstances it occurs.

I disabled all add ons, but the issue persists. Strangely enough, i can even exit anki when the button is blue - on the next start it will remain blue, even after pressing ‘y’ repeatedly. Going back to the deck view fixes the colour.

I can’t seem to reproduce this - it goes to blank once I sync.

I can reproduce/confirm the bug.

Try Sync from a deck panel. The color remains blue.
Try Sync from dashboard. The color changes to black.

1 Like

I’ve noticed something different, but may be related: I have auto sync enabled, so when I open my profile, Anki is syncing but the colour only changes to black when I sync manually.
As for your bug, I can reproduce it, but the colour changes to black upon returning to the dashboard without another sync.

1 Like

Sorry, what do you mean by deck panel / dashboard?

I can also recreate it:

  1. Open Anki, and you should have a black button
  2. Open any deck, and review a single card, and go back to decks, you should have a blue button
  3. Now open the Deck Overview (or open the Reviewer) and activate sync (e.g. by pressing Y), the button will remain blue
  4. Go back to Deck Browser, and the Sync button will turn black

Anki 2.1.35 (84dcaa86) Python 3.8.0 Qt 5.14.2 PyQt 5.14.2
Platform: Mac 10.16
Flags: frz=True ao=False sv=2

As I understood it, @AnkiBot was referring to the main screen with the deck tree as the dashboard and to the screen you got when clicking on a deck as a deck panel.

1 Like

@Rumo Correct. I didn’t know what to call it.

Dashboard: Where you see all decks.
Deck Panel: Where you see the ‘Study Now’ button.

Ah, thanks for elaborating. This is likely happening because the toolbar is only redrawn when visiting the deck list at the moment - perhaps it should be done at the end of a sync as well.

1 Like

Please let me know if the next beta does not fix it.

It now turns blue when syncing in the deck screen. But it’s still blue on startup despite auto sync and even when there’s been no change to the collection since the last manual sync.

Looks like we need to refresh after the initial sync as well - does the latest git fix it for you?

It works now when I open Anki and select my synchronised profile. However, when I first open another profile and then switch to the synchronising one, the button is still blue. Further switching of profiles works fine, on the other hand. :thinking:

Probably another toolbar.redraw() call is required somewhere - at this point it might be faster if you experiment on your end? :slight_smile:

I found that the problem isn’t with the state of the GUI anymore but with the syncing itself. In the described case, I can run print(mw.col.backend.sync_status(mw.pm.sync_auth())) in the console right after the sync and get required: NORMAL_SYNC back.
I’ll do some further digging later.


Edit: The profile switching I described before isn't required to reproduce this bug. It's enough to make a change on a different device and sync. Then when launching Anki on desktop, two syncs are required to reach a synchronsied state. Since I've already got it wrong once, it would be helpful if someone could confirm this.

sync_status_inner() caches server responses for 5 minutes. Syncing should update remote_sync_status at the end of the sync as well, but perhaps something is going wrong there?