Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 847ace4b authored by Nihar Thakkar's avatar Nihar Thakkar
Browse files

Show download percentage in small "Install" buttons

parent 51f00d66
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ class ApplicationViewHolder(private val activity: Activity, private val view: Vi
    @SuppressLint("SetTextI18n")
    override fun downloading(downloader: Downloader) {
        downloader.addListener { count, total ->
            installButton.text = "${toMiB(count)}/${toMiB(total)} MiB"
            installButton.text = ((toMiB(count) / toMiB(total)) * 100).toInt().toString() + "%"
        }
    }

+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ class SmallApplicationViewHolder(private val activity: Activity, private val vie
    @SuppressLint("SetTextI18n")
    override fun downloading(downloader: Downloader) {
        downloader.addListener { count, total ->
            installButton.text = "${toMiB(count)}/${toMiB(total)} MiB"
            installButton.text = ((toMiB(count) / toMiB(total)) * 100).toInt().toString() + "%"
        }
    }