Commit 7a3b0711 authored by Aayush Gupta's avatar Aayush Gupta
Browse files

application: StateManager: Remove non-required elvis operators



- Warnings observed in Android Studio

w: /builds/e/apps/apps/app/src/main/java/foundation/e/apps/application/model/StateManager.kt: (46, 86): Elvis operator (?:) always returns the left operand of non-nullable type String
w: /builds/e/apps/apps/app/src/main/java/foundation/e/apps/application/model/StateManager.kt: (79, 82): Elvis operator (?:) always returns the left operand of non-nullable type String
Signed-off-by: Aayush Gupta's avatarAayush Gupta <theimpulson@e.email>
parent 9664ab31
......@@ -43,7 +43,7 @@ class StateManager(private val info: ApplicationInfo, private val app: Applicati
} else if (appManager.isInstalling(app) && app.isInstalling) {
State.INSTALLING
} else if (PreferenceStorage(context).getBoolean(context.getString(R.string.prefs_microg_vrsn_installed), false)) {
if (info.isLastVersionInstalled(context, basicData.lastVersionNumber ?: "")) {
if (info.isLastVersionInstalled(context, basicData.lastVersionNumber)) {
State.NOT_UPDATED
} else {
State.INSTALLED
......@@ -76,7 +76,7 @@ class StateManager(private val info: ApplicationInfo, private val app: Applicati
} else if (appManager.isInstalling(app) && app.isInstalling) {
State.INSTALLING
} else if (PreferenceStorage(context).getBoolean(context.getString(R.string.prefs_microg_vrsn_installed), false)) {
if (info.isLastVersionInstalled(context, basicData.lastVersionNumber ?: "")) {
if (info.isLastVersionInstalled(context, basicData.lastVersionNumber)) {
State.NOT_UPDATED
} else {
State.INSTALLED
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment