Skip to content

Commit

Permalink
New version
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisBodin committed Dec 15, 2023
1 parent 3287441 commit 55280b0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/infomaniak/mail/utils/AccountUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -131,7 +131,7 @@ object AccountUtils : CredentialManager() {
}
}

fun removeUser(user: User) {
suspend fun removeUser(user: User) {
userDatabase.userDao().delete(user)
}

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 @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 55280b0

Please sign in to comment.