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
|
var totalSelectedBytes = 0L
|
||||||
|
|
||||||
selectedItemsList.forEach { item ->
|
selectedItemsList.forEach { item ->
|
||||||
totalSelectedBytes += when (item) {
|
totalSelectedBytes += item.totalBytes
|
||||||
is VisualDownloadCached.Header -> {
|
|
||||||
item.totalBytes
|
|
||||||
}
|
|
||||||
|
|
||||||
is VisualDownloadCached.Child -> {
|
|
||||||
item.totalBytes
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_selectedBytes.postValue(totalSelectedBytes)
|
_selectedBytes.postValue(totalSelectedBytes)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue