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

Commit 23c153a

Browse files
committed
Make module.prop version fallback handle more edge cases
1 parent ebd3f23 commit 23c153a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ public static String makeNameFromId(String moduleId) {
382382

383383
// Make versionName no longer than 16 charters to avoid UI overflow.
384384
public static String shortenVersionName(String versionName, long versionCode) {
385-
if (versionName == null) return "v" + versionCode;
385+
if (versionName == null || versionName.isEmpty() ||
386+
"null".equals(versionName)) return "v" + versionCode;
386387
if (versionName.length() <= 16) return versionName;
387388
int i = versionName.lastIndexOf('.');
388389
if (i != -1 && i <= 16 && versionName.indexOf('.') != i

0 commit comments

Comments
 (0)