mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-29 06:18:51 +02:00
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:
commit
b30bd495b7
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue