add icon and module info card

This commit is contained in:
egor-white
2025-06-22 16:05:40 +03:00
parent 0983262919
commit 6c6eeefcf1
3 changed files with 15 additions and 3 deletions

View File

@@ -329,3 +329,15 @@ fun disableStrategy(path: String, sharedPreferences: SharedPreferences) {
sharedPreferences.edit { remove("active_strategy") }
}
}
fun getModuleVersion(callback: (String) -> Unit) {
Shell.cmd("zaprett module-ver").submit { result ->
if (result.out.isNotEmpty()) callback(result.out.first()) else "undefined"
}
}
fun getBinVersion(callback: (String) -> Unit) {
Shell.cmd("zaprett bin-ver").submit { result ->
if (result.out.isNotEmpty()) callback(result.out.first()) else "undefined"
}
}