in client/securedrop_client/gui/widgets.py [0:0]
def update(self, is_starred: bool) -> None:
"""
If star was updated via the Journalist Interface or by another instance of the client, then
self.is_starred will not match the server and will need to be updated.
"""
if not self.controller.is_authenticated:
return
# Wait until ongoing star jobs are finished before checking if it matches with the server
if self.pending_count > 0:
return
# Wait until next sync to avoid the possibility of updating the star with outdated source
# information in case the server just received the star request.
if self.wait_until_next_sync:
self.wait_until_next_sync = False
return
if self.is_starred != is_starred:
self.is_starred = is_starred
self.setChecked(self.is_starred)