|
18 | 18 | package com.infomaniak.mail.data.cache |
19 | 19 |
|
20 | 20 | import android.content.Context |
21 | | -import com.infomaniak.lib.core.utils.SentryLog |
22 | 21 | import com.infomaniak.mail.data.models.AppSettings |
23 | 22 | import com.infomaniak.mail.data.models.AppSettings.Companion.DEFAULT_ID |
24 | 23 | import com.infomaniak.mail.data.models.Attachment |
@@ -46,6 +45,8 @@ import com.infomaniak.mail.utils.LocalStorageUtils |
46 | 45 | import io.realm.kotlin.Realm |
47 | 46 | import io.realm.kotlin.RealmConfiguration |
48 | 47 | import io.realm.kotlin.internal.platform.WeakReference |
| 48 | +import io.sentry.Sentry |
| 49 | +import io.sentry.SentryLevel |
49 | 50 | import kotlinx.coroutines.Dispatchers |
50 | 51 | import kotlinx.coroutines.runBlocking |
51 | 52 | import kotlinx.coroutines.sync.Mutex |
@@ -232,7 +233,10 @@ object RealmDatabase { |
232 | 233 | .build() |
233 | 234 |
|
234 | 235 | fun mailboxContent(mailboxId: Int, userId: Int): RealmConfiguration { |
235 | | - if (mailboxId == DEFAULT_ID) SentryLog.e(TAG, "RealmConfiguration problem with mailbox content, default ID is used.") |
| 236 | + if (mailboxId == DEFAULT_ID) Sentry.captureMessage( |
| 237 | + "RealmConfiguration problem with mailbox content, default ID is used.", |
| 238 | + SentryLevel.ERROR |
| 239 | + ) |
236 | 240 |
|
237 | 241 | return RealmConfiguration.Builder(mailboxContentSet) |
238 | 242 | .name(mailboxContentDbName(userId, mailboxId)) |
|
0 commit comments