@@ -246,6 +246,7 @@ class MainActivity : AppCompatActivity(), ChangeFolderCallback, ScanCompleteCall
246246 showFolder(rootElement!! )
247247 } else {
248248 rootElement?.mergePartialTree(internalRootElement)
249+ rootElement?.getCalculatedSize(true )
249250 currentElement?.let { changeFolder(it) }
250251 }
251252 updateStaticElements(rootElement!! , result.total, result.free)
@@ -419,13 +420,15 @@ class MainActivity : AppCompatActivity(), ChangeFolderCallback, ScanCompleteCall
419420 if (base == 0L ) {
420421 base = 1L
421422 }
422- val currentlyUsed = currentRoot.getCalculatedSize().div(base.toDouble())
423+ val used = currentRoot.getCalculatedSize(true )
424+ val currentlyUsedPerc = used.div(base.toDouble())
425+ Timber .tag(" updateStaticElements" ).e(" rfs used: ${readableFileSize(used)} " )
423426 fadeTextview(
424- readableFileSize(currentRoot.getCalculatedSize() ),
427+ readableFileSize(used ),
425428 binding.usedText
426429 )
427430 ObjectAnimator
428- .ofInt(binding.dataUsage, " progress" , (currentlyUsed * 100 ).toInt())
431+ .ofInt(binding.dataUsage, " progress" , (currentlyUsedPerc * 100 ).toInt())
429432 .setDuration(300 )
430433 .start()
431434 Timber .e(" updateStaticElements: CurrentRoot not null!" )
@@ -435,6 +438,7 @@ class MainActivity : AppCompatActivity(), ChangeFolderCallback, ScanCompleteCall
435438 }
436439
437440 fadeTextview(readableFileSize(rootUnused), binding.freeText)
441+ Timber .tag(" updateStaticElements" ).e(" rfs rootUnused: ${readableFileSize(rootUnused)} " )
438442 }
439443
440444 fun showFolder (currentRoot : StoragePrototype ) {
0 commit comments