mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-08 09:18:39 +01:00
Improve archive restore progress tracking and UX.
This commit is contained in:
committed by
Greyson Parrelli
parent
89a0541574
commit
1f40c7ab7e
@@ -116,6 +116,23 @@ class ByteSize(val bytes: Long) {
|
||||
return ByteSize(this.inWholeBytes * other)
|
||||
}
|
||||
|
||||
override fun toString(): String {
|
||||
return "ByteSize(${toUnitString(maxPlaces = 4, spaced = false)})"
|
||||
}
|
||||
|
||||
override fun equals(other: Any?): Boolean {
|
||||
if (this === other) return true
|
||||
if (javaClass != other?.javaClass) return false
|
||||
|
||||
other as ByteSize
|
||||
|
||||
return bytes == other.bytes
|
||||
}
|
||||
|
||||
override fun hashCode(): Int {
|
||||
return bytes.hashCode()
|
||||
}
|
||||
|
||||
enum class Size(val label: String) {
|
||||
BYTE("B"),
|
||||
KIBIBYTE("KB"),
|
||||
|
||||
Reference in New Issue
Block a user