@@ -21,8 +21,6 @@ import android.content.Context
21
21
import android.text.format.Formatter
22
22
import com.infomaniak.mail.R
23
23
import io.realm.kotlin.types.EmbeddedRealmObject
24
- import io.sentry.Sentry
25
- import io.sentry.SentryLevel
26
24
import kotlinx.serialization.SerialName
27
25
import kotlinx.serialization.Serializable
28
26
import kotlin.math.ceil
@@ -39,24 +37,11 @@ class Quotas : EmbeddedRealmObject {
39
37
return converted * 1_000L // Convert from KiloOctets to Octets
40
38
}
41
39
42
- fun getText (context : Context , email : String? ): String {
40
+ fun getText (context : Context ): String {
43
41
44
42
val usedSize = Formatter .formatShortFileSize(context, size)
45
43
val maxSize = Formatter .formatShortFileSize(context, QUOTAS_MAX_SIZE )
46
44
47
- // TODO: Remove this Sentry when we are sure the fix is the right one.
48
- if (_size < 0L || size < 0L || usedSize.firstOrNull() == ' -' ) {
49
- Sentry .withScope { scope ->
50
- scope.level = SentryLevel .WARNING
51
- scope.setExtra(" 1. mailbox" , " $email " )
52
- scope.setExtra(" 2. raw size" , " $_size " )
53
- scope.setExtra(" 3. display size" , usedSize)
54
- scope.setExtra(" 4. raw maxSize" , " $QUOTAS_MAX_SIZE " )
55
- scope.setExtra(" 5. display maxSize" , maxSize)
56
- Sentry .captureMessage(" Quotas: Something is negative when trying to display" )
57
- }
58
- }
59
-
60
45
return context.getString(R .string.menuDrawerMailboxStorage, usedSize, maxSize)
61
46
}
62
47
0 commit comments