From 55280b0eb00a9e0a72693909f5ea103e4ccd0c7b Mon Sep 17 00:00:00 2001 From: Joris Bodin Date: Fri, 15 Dec 2023 15:09:32 +0100 Subject: [PATCH] New version --- Core | 2 +- app/build.gradle | 4 ++-- .../main/java/com/infomaniak/mail/ui/login/LoginActivity.kt | 2 +- app/src/main/java/com/infomaniak/mail/utils/AccountUtils.kt | 6 +++--- app/src/main/java/com/infomaniak/mail/utils/LogoutUser.kt | 2 +- gradle/libs.versions.toml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Core b/Core index 9fd55e5e37..c5a4a7c941 160000 --- a/Core +++ b/Core @@ -1 +1 @@ -Subproject commit 9fd55e5e37076a7110b4c46cc45548f45609e8da +Subproject commit c5a4a7c94162669d6ebac87b9969b549ba16dbae diff --git a/app/build.gradle b/app/build.gradle index 086bf7e5d7..263f12edc4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,8 +22,8 @@ android { applicationId 'com.infomaniak.mail' minSdk 25 targetSdk 34 - versionCode 1_01_001_01 - versionName '1.1.1' + versionCode 1_01_002_02 + versionName '1.1.2' testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' setProperty "archivesBaseName", "infomaniak-mail-$versionName ($versionCode)" diff --git a/app/src/main/java/com/infomaniak/mail/ui/login/LoginActivity.kt b/app/src/main/java/com/infomaniak/mail/ui/login/LoginActivity.kt index 5e2f53a8e8..04ffeb2545 100644 --- a/app/src/main/java/com/infomaniak/mail/ui/login/LoginActivity.kt +++ b/app/src/main/java/com/infomaniak/mail/ui/login/LoginActivity.kt @@ -84,7 +84,7 @@ class LoginActivity : AppCompatActivity() { companion object { - fun authenticateUser(context: Context, apiToken: ApiToken, mailboxController: MailboxController): Any { + suspend fun authenticateUser(context: Context, apiToken: ApiToken, mailboxController: MailboxController): Any { if (AccountUtils.getUserById(apiToken.userId) != null) return getErrorResponse(RCore.string.errorUserAlreadyPresent) InfomaniakCore.bearerToken = apiToken.accessToken diff --git a/app/src/main/java/com/infomaniak/mail/utils/AccountUtils.kt b/app/src/main/java/com/infomaniak/mail/utils/AccountUtils.kt index bd1cd7c087..a98bd48a3b 100644 --- a/app/src/main/java/com/infomaniak/mail/utils/AccountUtils.kt +++ b/app/src/main/java/com/infomaniak/mail/utils/AccountUtils.kt @@ -105,11 +105,11 @@ object AccountUtils : CredentialManager() { return shouldStop } - fun requestCurrentUser(): User? { + suspend fun requestCurrentUser(): User? { return (getUserById(currentUserId) ?: userDatabase.userDao().getFirst()).also { currentUser = it } } - fun addUser(user: User) { + suspend fun addUser(user: User) { currentUser = user userDatabase.userDao().insert(user) } @@ -131,7 +131,7 @@ object AccountUtils : CredentialManager() { } } - fun removeUser(user: User) { + suspend fun removeUser(user: User) { userDatabase.userDao().delete(user) } diff --git a/app/src/main/java/com/infomaniak/mail/utils/LogoutUser.kt b/app/src/main/java/com/infomaniak/mail/utils/LogoutUser.kt index 8dac011358..daee4d3b1c 100644 --- a/app/src/main/java/com/infomaniak/mail/utils/LogoutUser.kt +++ b/app/src/main/java/com/infomaniak/mail/utils/LogoutUser.kt @@ -63,7 +63,7 @@ class LogoutUser @Inject constructor( } } - private fun updateCurrentMailboxId() { + private suspend fun updateCurrentMailboxId() { mailboxController.getFirstValidMailbox(AccountUtils.requestCurrentUser()!!.id)?.mailboxId?.let { AccountUtils.currentMailboxId = it } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 53f0e0e333..d2f4adf1ed 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -15,7 +15,7 @@ leakcanaryAndroid = "2.12" lifecycleProcess = "2.6.2" lottie = "6.2.0" navigation = "2.7.5" -realmKotlin = "1.12.0" +realmKotlin = "1.13.0" sentryAndroidFragment = "7.0.0" testRunner = "1.5.2" webkit = "1.9.0"