Skip to content

Commit

Permalink
feat(MyKSuiteMailQuota): Change mail quota unit
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianDevel committed Feb 20, 2025
1 parent c9ed491 commit 687075d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Core
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Quotas : EmbeddedRealmObject {
@SerialName("size")
private var _size: Long = 0L

val size: Long get() = _size * 1_000L // Convert from KiloOctets to Octets
val size: Long get() = _size * 1_024L // Convert from KiloOctets to Octets

val isFull get() = getProgress() >= 100

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/infomaniak/mail/utils/LogoutUser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class LogoutUser @Inject constructor(

user.logoutToken()
AccountUtils.removeUser(user)
MyKSuiteDataUtils.deleteKSuiteData(user.id)
MyKSuiteDataUtils.deleteData(user.id)
RealmDatabase.removeUserData(appContext, user.id)
mailboxController.deleteUserMailboxes(user.id)
localSettings.removeRegisteredFirebaseUser(userId = user.id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ object MyKSuiteUiUtils {

val mailProduct = with(myKSuite.mail) {
KSuiteProductsWithQuotas.Mail(
usedSize = formatShortFileSize(usedSize),
usedSize = formatShortFileSize(usedSizeInBytes),
maxSize = formatShortFileSize(storageSizeLimit),
progress = (usedSize.toDouble() / storageSizeLimit.toDouble()).toFloat(),
progress = (usedSizeInBytes.toDouble() / storageSizeLimit.toDouble()).toFloat(),
)
}

Expand Down

0 comments on commit 687075d

Please sign in to comment.