Commit a878243b authored by Mohit Mali's avatar Mohit Mali
Browse files

Resolve issue search menu. Change update automatically.

parent 39332169
Pipeline #99726 passed with stage
in 3 minutes and 3 seconds
......@@ -156,7 +156,6 @@ class Installer(private val packageName: String,
}
}
}
}
}
......
......@@ -38,10 +38,7 @@ class SearchElement(private val query: String, private val pageNumber: Int,
override fun doInBackground(vararg params: Context): ArrayList<Application> {
val apps = ArrayList<Application>()
if ("microG Exposure Notification version".contains(query, true)) {
val application: Application? = loadMicroGVersion(params[0])[0]
if (application != null && application.state != State.INSTALLED) {
apps.addAll(loadMicroGVersion(params[0]))
}
}
AllAppsSearchRequest(query, pageNumber, Constants.RESULTS_PER_PAGE)
......
......@@ -106,23 +106,22 @@ class UpdatesWorker(context: Context, params: WorkerParameters) : Worker(context
applications.forEach {
if (it.packageName == Constants.MICROG_PACKAGE) {
executeDownloadMicroG()
}else {
if (it.state == State.NOT_UPDATED) {
Log.i(TAG, "Updating ${it.packageName}")
it.buttonClicked(applicationContext, null)
}
}
if (it.state == State.NOT_UPDATED) {
Log.i(TAG, "Updating ${it.packageName}")
it.buttonClicked(applicationContext, null)
}
}
}
} else {
applications.forEach {
if (it.packageName == Constants.MICROG_PACKAGE) {
executeDownloadMicroG()
}else {
if (it.state == State.NOT_UPDATED) {
Log.i(TAG, "Updating ${it.packageName}")
it.buttonClicked(applicationContext, null)
}
}
if (it.state == State.NOT_UPDATED) {
Log.i(TAG, "Updating ${it.packageName}")
it.buttonClicked(applicationContext, null)
}
}
}
......
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