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:
James Allen 2016-05-27 14:08:46 +01:00
parent 4bc31ae2b9
commit a605dae7ba

View file

@ -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