SwastikTripathi 84af2760ce
fix(ui): show 1 MB instead of 1024 KB in formatBytes (#6469)
* fix(ui): show 1 MB instead of 1024 KB in formatBytes

* refactor(ui): compute the scaled size once in formatBytes

Move the repeated scaling expression into a small helper, so the unit
bump only changes the index and the value is derived from it. The output
is unchanged for every input. The GB test case now uses 1024^3 - 1
instead of an arbitrary offset.

---------

Co-authored-by: Deluan <deluan@navidrome.org>
2026-11-15 14:10:53 -05:00
..
2026-11-03 10:58:48 -05:00
2025-03-07 19:47:08 -05:00
…