fix(android): single jump per polling loop for detekt LoopWithTooManyJumpStatements
android / Build + lint + test (push) Successful in 4m0s
android / Build + lint + test (push) Successful in 4m0s
This commit is contained in:
@@ -524,13 +524,14 @@ class PlayerController @Inject constructor(
|
|||||||
val changed = current.isPlaying != effectiveIsPlaying ||
|
val changed = current.isPlaying != effectiveIsPlaying ||
|
||||||
current.positionMs != newPos ||
|
current.positionMs != newPos ||
|
||||||
current.durationMs != newDur
|
current.durationMs != newDur
|
||||||
if (!changed) continue
|
if (changed) {
|
||||||
uiStateInternal.value = current.copy(
|
uiStateInternal.value = current.copy(
|
||||||
isPlaying = effectiveIsPlaying,
|
isPlaying = effectiveIsPlaying,
|
||||||
positionMs = newPos,
|
positionMs = newPos,
|
||||||
durationMs = newDur,
|
durationMs = newDur,
|
||||||
bufferedPositionMs = newBuf,
|
bufferedPositionMs = newBuf,
|
||||||
)
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user