Skip to content

Commit 5c6e437

Browse files
committed
remember play position for online video
1 parent 74993cc commit 5c6e437

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/src/main/kotlin/me/sweetll/tucao/business/video/VideoActivity.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,8 @@ class VideoActivity : BaseActivity(), DanmuVideoPlayer.DanmuPlayerHolder {
396396
override fun onSavePlayHistory(position: Int) {
397397
HistoryHelpers.savePlayHistory(
398398
video.copy(create = DateFormat.format("yyyy-MM-dd hh:mm:ss", Date()).toString())
399-
.apply {
400-
parts = parts.filter {
399+
.also {
400+
it.parts = video.parts.filter {
401401
it.vid == selectedPart.vid
402402
}.map {
403403
it.lastPlayPosition = position

0 commit comments

Comments
 (0)