From cb187300fee19f70da16276ac18fa4c06dd5a237 Mon Sep 17 00:00:00 2001 From: J-Jamet Date: Sat, 23 Jan 2021 11:21:38 +0100 Subject: [PATCH] Deactivate GiB #851 --- .../java/com/kunzisoft/keepass/utils/DataByte.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/kunzisoft/keepass/utils/DataByte.kt b/app/src/main/java/com/kunzisoft/keepass/utils/DataByte.kt index 5f3f2d008..4a8e53d6c 100644 --- a/app/src/main/java/com/kunzisoft/keepass/utils/DataByte.kt +++ b/app/src/main/java/com/kunzisoft/keepass/utils/DataByte.kt @@ -29,9 +29,9 @@ class DataByte(var number: Long, var format: ByteFormat) { return when (this.format) { ByteFormat.BYTE -> { when { - this.number % GIBIBYTES == 0L -> { - DataByte((this.number / GIBIBYTES), ByteFormat.GIBIBYTE) - } + //this.number % GIBIBYTES == 0L -> { + // DataByte((this.number / GIBIBYTES), ByteFormat.GIBIBYTE) + //} this.number % MEBIBYTES == 0L -> { DataByte((this.number / MEBIBYTES), ByteFormat.MEBIBYTE) } @@ -57,7 +57,7 @@ class DataByte(var number: Long, var format: ByteFormat) { ByteFormat.BYTE -> this.number ByteFormat.KIBIBYTE -> this.number * KIBIBYTES ByteFormat.MEBIBYTE -> this.number * MEBIBYTES - ByteFormat.GIBIBYTE -> this.number * GIBIBYTES + //ByteFormat.GIBIBYTE -> this.number * GIBIBYTES } } @@ -72,8 +72,8 @@ class DataByte(var number: Long, var format: ByteFormat) { enum class ByteFormat(@StringRes var stringId: Int) { BYTE(R.string.unit_byte), KIBIBYTE(R.string.unit_kibibyte), - MEBIBYTE(R.string.unit_mebibyte), - GIBIBYTE(R.string.unit_gibibyte) + MEBIBYTE(R.string.unit_mebibyte) + //GIBIBYTE(R.string.unit_gibibyte) } companion object {