Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 2e84e46

Browse files
committed
Fix Markdown changelog links not opening. Fix #132 (Again)
1 parent 6ecf659 commit 2e84e46

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

app/src/main/java/com/fox2code/mmm/ActionButtonType.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package com.fox2code.mmm;
22

33
import android.content.Context;
4+
import android.text.Spanned;
45
import android.util.Log;
56
import android.widget.Button;
67
import android.widget.ImageButton;
8+
import android.widget.TextView;
79
import android.widget.Toast;
810

911
import androidx.annotation.DrawableRes;
@@ -76,12 +78,13 @@ public void doAction(ImageButton button, ModuleHolder moduleHolder) {
7678
builder.setTitle(moduleInfo.name).setCancelable(true)
7779
.setIcon(R.drawable.ic_baseline_extension_24);
7880
CharSequence desc = moduleInfo.description;
81+
Markwon markwon = null;
7982
if (moduleInfo instanceof LocalModuleInfo) {
8083
LocalModuleInfo localModuleInfo = (LocalModuleInfo) moduleInfo;
8184
if (!localModuleInfo.updateChangeLog.isEmpty()) {
82-
Markwon markwon = MainApplication.getINSTANCE().getMarkwon();
85+
markwon = MainApplication.getINSTANCE().getMarkwon();
8386
// Re-render each time in cse of config changes
84-
desc = markwon.render(markwon.parse(localModuleInfo.updateChangeLog));
87+
desc = markwon.toMarkdown(localModuleInfo.updateChangeLog);
8588
}
8689
}
8790

@@ -110,6 +113,11 @@ public void doAction(ImageButton button, ModuleHolder moduleHolder) {
110113
alertButton.setPadding(dim5dp, dim5dp, dim5dp, dim5dp);
111114
}
112115
}
116+
if (markwon != null) {
117+
TextView messageView = alertDialog.getWindow()
118+
.findViewById(android.R.id.message);
119+
markwon.setParsedMarkdown(messageView, (Spanned) desc);
120+
}
113121
}
114122
},
115123
UNINSTALL() {

app/src/main/java/com/fox2code/mmm/utils/PropUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ public class PropUtils {
6868
final String GH_UC = "https://raw.githubusercontent.com/";
6969
moduleUpdateJsonFallbacks.put("BluetoothLibraryPatcher",
7070
GH_UC + "3arthur6/BluetoothLibraryPatcher/master/update.json");
71+
moduleUpdateJsonFallbacks.put("busybox-ndk",
72+
GH_UC + "Magisk-Modules-Repo/busybox-ndk/master/update.json");
7173
moduleUpdateJsonFallbacks.put("Detach",
7274
GH_UC + "xerta555/Detach-Files/blob/master/Updater.json");
7375
moduleUpdateJsonFallbacks.put("riru_ifw_enhance", "https://github.com/" +

0 commit comments

Comments
 (0)