manager: module description and name is optional.

This commit is contained in:
weishu
2023-08-03 23:15:21 +08:00
parent 06681a2490
commit d6a7231fae

View File

@@ -87,15 +87,16 @@ class ModuleViewModel : ViewModel() {
.map { obj -> .map { obj ->
ModuleInfo( ModuleInfo(
obj.getString("id"), obj.getString("id"),
obj.getString("name"),
obj.optString("name"),
obj.optString("author", "Unknown"), obj.optString("author", "Unknown"),
obj.optString("version", "Unknown"), obj.optString("version", "Unknown"),
obj.optInt("versionCode", 0), obj.optInt("versionCode", 0),
obj.getString("description"), obj.optString("description"),
obj.getBoolean("enabled"), obj.getBoolean("enabled"),
obj.getBoolean("update"), obj.getBoolean("update"),
obj.getBoolean("remove"), obj.getBoolean("remove"),
obj.optString("updateJson", "") obj.optString("updateJson")
) )
}.toList() }.toList()
isNeedRefresh = false isNeedRefresh = false