mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
Simplify
This commit is contained in:
parent
cb21eff44a
commit
77e1b87574
1 changed files with 1 additions and 9 deletions
|
@ -119,15 +119,7 @@ class DownloadViewModel : ViewModel() {
|
|||
var totalSelectedBytes = 0L
|
||||
|
||||
selectedItemsList.forEach { item ->
|
||||
totalSelectedBytes += when (item) {
|
||||
is VisualDownloadCached.Header -> {
|
||||
item.totalBytes
|
||||
}
|
||||
|
||||
is VisualDownloadCached.Child -> {
|
||||
item.totalBytes
|
||||
}
|
||||
}
|
||||
totalSelectedBytes += item.totalBytes
|
||||
}
|
||||
|
||||
_selectedBytes.postValue(totalSelectedBytes)
|
||||
|
|
Loading…
Reference in a new issue