mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 22:23:42 +01:00
Add event when the connection lost modal is shown for users who have internet, but doc saves aren't successful (#25960)
* adding naive event send for case where realtime is disconnected, but user has internet connection for events * using reportError and moving ops length summation to getUnsavedOpsSize GitOrigin-RevId: 7c1c8e31ddbaa21fbc299703c69cf07ab46df925
This commit is contained in:
committed by
Copybot
parent
d7b282c176
commit
dcd73f16a6
@@ -41,6 +41,22 @@ export class OpenDocuments {
|
||||
return this.openDocs.get(docId)
|
||||
}
|
||||
|
||||
getUnsavedOpsSize() {
|
||||
const docs = this.unsavedDocs()
|
||||
let pendingOpsLength = 0
|
||||
let inflightOpsLength = 0
|
||||
for (const doc of docs) {
|
||||
const pendingOp = doc.getPendingOp()
|
||||
const inFlightOp = doc.getInflightOp()
|
||||
pendingOpsLength += pendingOp?.length || 0
|
||||
inflightOpsLength += inFlightOp?.length || 0
|
||||
}
|
||||
return {
|
||||
pendingOpsLength,
|
||||
inflightOpsLength,
|
||||
}
|
||||
}
|
||||
|
||||
private createDoc(docId: string) {
|
||||
const doc = new DocumentContainer(
|
||||
docId,
|
||||
|
||||
Reference in New Issue
Block a user