release 2.3.5

Signed-off-by: androidacy-user <opensource@androidacy.com>
pull/89/head
androidacy-user 2 years ago
parent 1c47c44454
commit 9d20606df7

@ -48,8 +48,8 @@ android {
applicationId = "com.fox2code.mmm"
minSdk = 26
targetSdk = 34
versionCode = 88
versionName = "2.3.4"
versionCode = 89
versionName = "2.3.5"
vectorDrawables {
useSupportLibrary = true
}
@ -374,7 +374,7 @@ dependencies {
// Chromium cronet from androidacy
implementation("org.chromium.net:cronet-embedded:113.5672.61")
val libsuVersion = "5.1.0"
val libsuVersion = "5.2.1"
// The core module that provides APIs to a shell
implementation("com.github.topjohnwu.libsu:core:${libsuVersion}")

@ -11,7 +11,6 @@ import android.text.Spanned
import android.widget.TextView
import android.widget.Toast
import androidx.annotation.DrawableRes
import com.fox2code.mmm.BuildConfig
import com.fox2code.mmm.MainApplication
import com.fox2code.mmm.MainApplication.Companion.INSTANCE
import com.fox2code.mmm.MainApplication.Companion.isShowcaseMode
@ -158,19 +157,6 @@ enum class ActionButtonType {
.recordEvent("view_update_install", HashMap<String, Any>().apply {
put("module", name ?: "null")
})
// if text is reinstall, we need to uninstall first - warn the user but don't proceed
if (moduleHolder.moduleInfo != null && moduleHolder.repoModule == null && button.text == button.context.getString(R.string.reinstall)) {
if (!BuildConfig.DEBUG) {
val builder = MaterialAlertDialogBuilder(button.context)
builder.setTitle(R.string.reinstall)
.setMessage(R.string.reinstall_warning_v2)
.setCancelable(true)
// ok button that does nothing
.setPositiveButton(R.string.ok, null)
.show()
return
}
}
// prefer repomodule if possible
var updateZipUrl = ""
if (moduleHolder.repoModule != null && moduleHolder.repoModule!!.zipUrl != null) {
@ -180,6 +166,16 @@ enum class ActionButtonType {
if (updateZipUrl.isEmpty() && moduleHolder.moduleInfo != null && moduleHolder.moduleInfo!!.updateZipUrl != null) {
updateZipUrl = moduleHolder.moduleInfo!!.updateZipUrl!!
}
// still empty? show dialog
if (updateZipUrl.isEmpty()) {
val materialAlertDialogBuilder = MaterialAlertDialogBuilder(button.context)
materialAlertDialogBuilder.setTitle(R.string.invalid_update_url)
materialAlertDialogBuilder.setMessage(R.string.invalid_update_url_message)
materialAlertDialogBuilder.setPositiveButton(android.R.string.ok, null)
materialAlertDialogBuilder.setIcon(R.drawable.ic_baseline_error_24)
materialAlertDialogBuilder.show()
return
}
// Androidacy manage the selection between download and install
if (isAndroidacyLink(updateZipUrl)) {
openUrlAndroidacy(

@ -427,4 +427,6 @@
<string name="update_failed">Could not check for updates</string>
<string name="update_failed_description">Failed to check for updates. If this keeps happening, please ensure the app is not restricted from background usage.</string>
<string name="install_from_storage_file_not_found">Could not find selected file. Please try again.</string>
<string name="invalid_update_url">No update URL found</string>
<string name="invalid_update_url_message">Could not determine a suitable URL to reinstall or update this module from. Please check with the source you got this module from.</string>
</resources>

Loading…
Cancel
Save