Skip to content

Commit

Permalink
release 2.3.5
Browse files Browse the repository at this point in the history
Signed-off-by: androidacy-user <[email protected]>
  • Loading branch information
androidacy-user committed Nov 7, 2023
1 parent 1c47c44 commit 9d20606
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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}")

Expand Down
24 changes: 10 additions & 14 deletions app/src/main/kotlin/com/fox2code/mmm/module/ActionButtonType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand All @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

0 comments on commit 9d20606

Please sign in to comment.