mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Don't show saving just because of pending ops
When typing continuously, there is always a pending op present. The only time we're not saving is if the inflight op isn't changing. So long as this has changed, it means the previous one has been processed.
This commit is contained in:
parent
4bc31ae2b9
commit
a605dae7ba
1 changed files with 6 additions and 3 deletions
|
@ -146,12 +146,15 @@ define [
|
|||
if !inflightOp? and !pendingOp?
|
||||
# there's nothing going on
|
||||
saved = true
|
||||
else if inflightOp == @oldInflightOp
|
||||
saved = false
|
||||
else if pendingOp?
|
||||
sl_console.log "[pollSavedStatus] no inflight or pending ops"
|
||||
else if inflightOp? and inflightOp == @oldInflightOp
|
||||
# The same inflight op has been sitting unacked since we
|
||||
# last checked.
|
||||
saved = false
|
||||
sl_console.log "[pollSavedStatus] inflight op is same as before"
|
||||
else
|
||||
saved = true
|
||||
sl_console.log "[pollSavedStatus] assuming saved (inflightOp?: #{inflightOp?}, pendingOp?: #{pendingOp?})"
|
||||
|
||||
@oldInflightOp = inflightOp
|
||||
return saved
|
||||
|
|
Loading…
Reference in a new issue