Add plugin error message if a plugin is not working

This commit is contained in:
MM20
2023-12-10 17:21:04 +01:00
parent 0c8d3e9218
commit 2070a25c7e
4 changed files with 22 additions and 6 deletions
@@ -144,7 +144,7 @@ internal class PluginServiceImpl(
}
}
override suspend fun getPluginState(plugin: Plugin): PluginState? {
override suspend fun getPluginState(plugin: Plugin): PluginState {
val bundle = withContext(Dispatchers.IO) {
context.contentResolver.call(
Uri.Builder()
@@ -155,8 +155,8 @@ internal class PluginServiceImpl(
null,
null
)
} ?: return null
return PluginState.fromBundle(bundle)
} ?: return PluginState.Error
return PluginState.fromBundle(bundle) ?: PluginState.Error
}
override fun isPluginHostInstalled(): Flow<Boolean> {