Fix Markdown changelog links not opening. Fix #132 (Again)

pull/140/head
Fox2Code 2 years ago
parent 6ecf659208
commit 2e84e46402

@ -1,9 +1,11 @@
package com.fox2code.mmm;
import android.content.Context;
import android.text.Spanned;
import android.util.Log;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.DrawableRes;
@ -76,12 +78,13 @@ public enum ActionButtonType {
builder.setTitle(moduleInfo.name).setCancelable(true)
.setIcon(R.drawable.ic_baseline_extension_24);
CharSequence desc = moduleInfo.description;
Markwon markwon = null;
if (moduleInfo instanceof LocalModuleInfo) {
LocalModuleInfo localModuleInfo = (LocalModuleInfo) moduleInfo;
if (!localModuleInfo.updateChangeLog.isEmpty()) {
Markwon markwon = MainApplication.getINSTANCE().getMarkwon();
markwon = MainApplication.getINSTANCE().getMarkwon();
// Re-render each time in cse of config changes
desc = markwon.render(markwon.parse(localModuleInfo.updateChangeLog));
desc = markwon.toMarkdown(localModuleInfo.updateChangeLog);
}
}
@ -110,6 +113,11 @@ public enum ActionButtonType {
alertButton.setPadding(dim5dp, dim5dp, dim5dp, dim5dp);
}
}
if (markwon != null) {
TextView messageView = alertDialog.getWindow()
.findViewById(android.R.id.message);
markwon.setParsedMarkdown(messageView, (Spanned) desc);
}
}
},
UNINSTALL() {

@ -68,6 +68,8 @@ public class PropUtils {
final String GH_UC = "https://raw.githubusercontent.com/";
moduleUpdateJsonFallbacks.put("BluetoothLibraryPatcher",
GH_UC + "3arthur6/BluetoothLibraryPatcher/master/update.json");
moduleUpdateJsonFallbacks.put("busybox-ndk",
GH_UC + "Magisk-Modules-Repo/busybox-ndk/master/update.json");
moduleUpdateJsonFallbacks.put("Detach",
GH_UC + "xerta555/Detach-Files/blob/master/Updater.json");
moduleUpdateJsonFallbacks.put("riru_ifw_enhance", "https://github.com/" +

Loading…
Cancel
Save