@@ -95,7 +95,6 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
9595 }
9696
9797 totalSpace.text = String .format(context.getString(R .string.total_storage), " …" )
98- getSizes(volumeName)
9998
10099 if (volumeNames.size > 1 ) {
101100 root.children.forEach { it.beGone() }
@@ -155,8 +154,7 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
155154 val tealColor = context.resources.getColor(R .color.md_teal_700)
156155 val pinkColor = context.resources.getColor(R .color.md_pink_700)
157156
158- volumes.entries.forEach { (it, volumeBinding) ->
159- getSizes(it)
157+ volumes.values.forEach { volumeBinding ->
160158 volumeBinding.apply {
161159 mainStorageUsageProgressbar.setIndicatorColor(properPrimaryColor)
162160 mainStorageUsageProgressbar.trackColor = properPrimaryColor.adjustAlpha(LOWER_ALPHA )
@@ -335,6 +333,7 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
335333 freeSpaceValue.text = freeStorageSpace.formatSizeThousand()
336334 totalSpace.text = String .format(context.getString(R .string.total_storage), totalStorageSpace.formatSizeThousand())
337335 freeSpaceLabel.beVisible()
336+ getSizes(volumeName)
338337 }
339338 }
340339 }
@@ -365,7 +364,6 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
365364 } else {
366365 showProgressBar()
367366 ensureBackgroundThread {
368- val start = System .currentTimeMillis()
369367 val filtered = allDeviceListItems.filter { it.mName.contains(text, true ) }.toMutableList() as ArrayList <ListItem >
370368 if (lastSearchedText != text) {
371369 return @ensureBackgroundThread
0 commit comments