split groups of save history items that have different status results

This commit is contained in:
shaun 2024-07-16 18:01:09 +10:00
parent 03a46decba
commit 79df676a13

View file

@ -71,6 +71,7 @@ export default {
let lastKey = null let lastKey = null
let numSaves = 0 let numSaves = 0
let numSyncs = 0 let numSyncs = 0
let lastSaveName = null
this.mediaEvents.forEach((evt) => { this.mediaEvents.forEach((evt) => {
const date = this.$formatDate(evt.timestamp, 'MMM dd, yyyy') const date = this.$formatDate(evt.timestamp, 'MMM dd, yyyy')
@ -90,7 +91,8 @@ export default {
// Collapse saves // Collapse saves
if (evt.name === 'Save') { if (evt.name === 'Save') {
if (numSaves > 0 && !keyUpdated) { let saveName = evt.name + "-" + evt.serverSyncAttempted + "-" + evt.serverSyncSuccess
if (lastSaveName === saveName && numSaves > 0 && !keyUpdated) {
include = false include = false
const totalInGroup = groups[key].length const totalInGroup = groups[key].length
groups[key][totalInGroup - 1].num = numSaves groups[key][totalInGroup - 1].num = numSaves
@ -98,6 +100,7 @@ export default {
} else { } else {
numSaves = 1 numSaves = 1
} }
lastSaveName = saveName
} else { } else {
numSaves = 0 numSaves = 0
} }