@@ -89,7 +89,7 @@ object RealmDatabase {
89
89
val mailboxInfo get() = Realm .open(RealmConfig .mailboxInfo)
90
90
91
91
val newMailboxContentInstance get() = newMailboxContentInstance(AccountUtils .currentUserId, AccountUtils .currentMailboxId)
92
- fun newMailboxContentInstance (userId : Int , mailboxId : Int ) = Realm .open(RealmConfig .mailboxContent(mailboxId, userId ))
92
+ fun newMailboxContentInstance (userId : Int , mailboxId : Int ) = Realm .open(RealmConfig .mailboxContent(userId, mailboxId ))
93
93
94
94
class MailboxContent {
95
95
operator fun invoke () = runBlocking(Dispatchers .IO ) {
@@ -142,7 +142,7 @@ object RealmDatabase {
142
142
143
143
// region Delete Realm
144
144
fun deleteMailboxContent (mailboxId : Int , userId : Int = AccountUtils .currentUserId) {
145
- Realm .deleteRealm(RealmConfig .mailboxContent(mailboxId, userId ))
145
+ Realm .deleteRealm(RealmConfig .mailboxContent(userId, mailboxId ))
146
146
}
147
147
148
148
fun removeUserData (context : Context , userId : Int ) {
@@ -232,11 +232,11 @@ object RealmDatabase {
232
232
.migration(MAILBOX_INFO_MIGRATION )
233
233
.build()
234
234
235
- fun mailboxContent (mailboxId : Int , userId : Int ): RealmConfiguration {
236
- if (mailboxId == DEFAULT_ID ) Sentry .captureMessage(
237
- " RealmConfiguration problem with mailbox content, default ID is used. " ,
238
- SentryLevel .ERROR
239
- )
235
+ fun mailboxContent (userId : Int , mailboxId : Int ): RealmConfiguration {
236
+
237
+ if (mailboxId == DEFAULT_ID ) {
238
+ Sentry .captureMessage( " RealmConfiguration problem with mailbox content, default ID is used. " , SentryLevel .ERROR )
239
+ }
240
240
241
241
return RealmConfiguration .Builder (mailboxContentSet)
242
242
.name(mailboxContentDbName(userId, mailboxId))
0 commit comments