mirror of
https://github.com/FossifyOrg/File-Manager.git
synced 2026-06-01 12:37:03 -04:00
fix: set progress after computing total size (#253)
Refs: https://github.com/FossifyOrg/File-Manager/issues/251
This commit is contained in:
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- Fixed empty storage usage bars on initial load ([#251])
|
||||
|
||||
## [1.2.0] - 2025-07-12
|
||||
### Changed
|
||||
@@ -58,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
[#149]: https://github.com/FossifyOrg/File-Manager/issues/149
|
||||
[#150]: https://github.com/FossifyOrg/File-Manager/issues/150
|
||||
[#176]: https://github.com/FossifyOrg/File-Manager/issues/176
|
||||
[#251]: https://github.com/FossifyOrg/File-Manager/issues/251
|
||||
|
||||
[Unreleased]: https://github.com/FossifyOrg/File-Manager/compare/1.2.0...HEAD
|
||||
[1.2.0]: https://github.com/FossifyOrg/File-Manager/compare/1.1.0...1.2.0
|
||||
|
||||
@@ -95,7 +95,6 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
|
||||
}
|
||||
|
||||
totalSpace.text = String.format(context.getString(R.string.total_storage), "…")
|
||||
getSizes(volumeName)
|
||||
|
||||
if (volumeNames.size > 1) {
|
||||
root.children.forEach { it.beGone() }
|
||||
@@ -155,8 +154,7 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
|
||||
val tealColor = context.resources.getColor(R.color.md_teal_700)
|
||||
val pinkColor = context.resources.getColor(R.color.md_pink_700)
|
||||
|
||||
volumes.entries.forEach { (it, volumeBinding) ->
|
||||
getSizes(it)
|
||||
volumes.values.forEach { volumeBinding ->
|
||||
volumeBinding.apply {
|
||||
mainStorageUsageProgressbar.setIndicatorColor(properPrimaryColor)
|
||||
mainStorageUsageProgressbar.trackColor = properPrimaryColor.adjustAlpha(LOWER_ALPHA)
|
||||
@@ -335,6 +333,7 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
|
||||
freeSpaceValue.text = freeStorageSpace.formatSizeThousand()
|
||||
totalSpace.text = String.format(context.getString(R.string.total_storage), totalStorageSpace.formatSizeThousand())
|
||||
freeSpaceLabel.beVisible()
|
||||
getSizes(volumeName)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -365,7 +364,6 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
|
||||
} else {
|
||||
showProgressBar()
|
||||
ensureBackgroundThread {
|
||||
val start = System.currentTimeMillis()
|
||||
val filtered = allDeviceListItems.filter { it.mName.contains(text, true) }.toMutableList() as ArrayList<ListItem>
|
||||
if (lastSearchedText != text) {
|
||||
return@ensureBackgroundThread
|
||||
|
||||
Reference in New Issue
Block a user