Skip to content

Commit

Permalink
Give the returned stats to StatsManager to update if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
leandroalonso committed Dec 12, 2024
1 parent e9943d8 commit 621f6d8
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ extension SyncTask {
case .bookmark:
bookmarksToImport.append(item.bookmark)
case .device:
continue // we aren't expecting the server to send us devices
StatsManager.shared.updateStatsIfNeeded(
savedDynamicSpeed: TimeInterval(item.device.timeSilenceRemoval.value),
savedVariableSpeed: TimeInterval(item.device.timeVariableSpeed.value),
totalListenedTo: TimeInterval(item.device.timeListened.value),
totalSkipped: TimeInterval(item.device.timeSkipping.value),
savedAutoSkipping: TimeInterval(item.device.timeIntroSkipping.value)
)
}
}

Expand Down

0 comments on commit 621f6d8

Please sign in to comment.