mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Increase the length of unsaved doc time before the editor is locked (#23431)
* Use opInflightSince to measure unsaved doc time * Use performance.now() for lastAcked timestamp * Use inflightOpCreatedAt * Increase MAX_UNSAVED_ALERT_SECONDS to 15 * Increase MAX_UNSAVED_SECONDS to 30 * Increase FATAL_OP_TIMEOUT to 45000 * Convert "Connection lost" modal to a notification GitOrigin-RevId: 2d4233723620fd03ce6d6c5795c48c33c0b2f92c
This commit is contained in:
@@ -182,6 +182,10 @@ export class DocumentContainer extends EventEmitter {
|
||||
return this.doc?.getRecentAck()
|
||||
}
|
||||
|
||||
getInflightOpCreatedAt() {
|
||||
return this.doc?.getInflightOpCreatedAt()
|
||||
}
|
||||
|
||||
hasBufferedOps() {
|
||||
return this.doc?.hasBufferedOps()
|
||||
}
|
||||
@@ -354,7 +358,7 @@ export class DocumentContainer extends EventEmitter {
|
||||
pendingOpSize < MAX_PENDING_OP_SIZE
|
||||
) {
|
||||
// There is an op waiting to go to server but it is small and
|
||||
// within the flushDelay, this is OK for now.
|
||||
// within the recent ack limit, this is OK for now.
|
||||
saved = true
|
||||
debugConsole.log(
|
||||
'[pollSavedStatus] pending op (small with recent ack) assume ok',
|
||||
|
||||
Reference in New Issue
Block a user