Skip to content

Commit

Permalink
New version
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisBodin committed Oct 23, 2023
1 parent dfa66c7 commit d75fcb9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 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_00_016_01
versionName '1.0.16'
versionCode 1_00_017_01
versionName '1.0.17'
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'

setProperty "archivesBaseName", "infomaniak-mail-$versionName ($versionCode)"
Expand Down
17 changes: 10 additions & 7 deletions app/src/main/java/com/infomaniak/mail/utils/Extensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -511,13 +511,16 @@ fun Fragment.getStringWithBoldArg(@StringRes resId: Int, arg: String): Spanned {
return Html.fromHtml(getString(resId, "<b>$coloredArg</b>"), Html.FROM_HTML_MODE_LEGACY)
}

fun Context.isUserAlreadySynchronized(): Boolean {
val accountManager = AccountManager.get(this)
val accounts = accountManager.getAccountsByType("infomaniak.com.sync")
val account = accounts.find { accountManager.getUserData(it, "user_name") == AccountUtils.currentUser?.login }

return account != null
}
// TODO Does not work, needs to be fixed
// fun Context.isUserAlreadySynchronized(): Boolean {
// val accountManager = AccountManager.get(this)
// val accounts = accountManager.getAccountsByType("infomaniak.com.sync")
// val account = accounts.find { accountManager.getUserData(it, "user_name") == AccountUtils.currentUser?.login }
//
// return account != null
// }

fun Context.isUserAlreadySynchronized(): Boolean = false

fun Context.getLoginActivityIntent(args: LoginActivityArgs? = null, shouldClearStack: Boolean = false): Intent {
return Intent(this, LoginActivity::class.java).apply {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ flexbox = "3.0.0"
googleServices = "4.3.15"
hiltAndroid = "2.48.1"
hiltAndroidx = "1.0.0"
jsoup = "1.16.1"
jsoup = "1.16.2"
junitJupiterEngine = "5.10.0"
kapt = "1.8.22"
kotlin = "1.8.22"
Expand Down

0 comments on commit d75fcb9

Please sign in to comment.