Skip to content

Commit

Permalink
Fix bug with progress message
Browse files Browse the repository at this point in the history
  • Loading branch information
ibusko committed Jun 25, 2021
1 parent a3d2725 commit f25cb28
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jdaviz/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def __init__(self):
self.first = True

def put(self, state, msg):

if len(self.queue) == 0:
self._write_message(state, msg)

self.queue.appendleft(msg)
if not msg.loading:
self.queue.appendleft(msg)

def close_current_message(self, state):

Expand All @@ -77,6 +77,9 @@ def _write_message(self, state, msg):
state.snackbar['loading'] = msg.loading
state.snackbar['show'] = True

if msg.loading:
return

# timeout of the first message needs to be increased by a
# few seconds to account for the time spent in page rendering.
# A more elegant way to address this should be via a callback
Expand Down

0 comments on commit f25cb28

Please sign in to comment.