mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 13:17:48 +01:00
Using a float on the progress on app updates
Not sure if needed but I saw some funny behavior with the progress bar
This commit is contained in:
parent
e4ea5d0344
commit
830a834ea6
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ class UpdaterService : Service() {
|
|||
var lastTick = 0L
|
||||
|
||||
override fun update(bytesRead: Long, contentLength: Long, done: Boolean) {
|
||||
val progress = (100 * bytesRead / contentLength).toInt()
|
||||
val progress = (100 * (bytesRead.toFloat() / contentLength)).toInt()
|
||||
val currentTime = System.currentTimeMillis()
|
||||
if (progress > savedProgress && currentTime - 200 > lastTick) {
|
||||
savedProgress = progress
|
||||
|
|
Loading…
Reference in a new issue