Merge pull request #1257 from faush01/feature/history_split_saves

split groups of save history items that have different status results
This commit is contained in:
advplyr 2024-08-26 16:19:19 -05:00 committed by GitHub
commit b30bd495b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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