Add weather plugin specific settings
This commit is contained in:
@@ -46,6 +46,10 @@ interface PluginService {
|
||||
enabled: Boolean? = null,
|
||||
): Flow<List<PluginWithState>>
|
||||
|
||||
fun getPluginWithState(
|
||||
authority: String,
|
||||
): Flow<PluginWithState?>
|
||||
|
||||
fun getPluginPackages(): Flow<List<PluginPackage>>
|
||||
fun getPluginPackage(packageName: String): Flow<PluginPackage?>
|
||||
suspend fun getPluginState(plugin: Plugin): PluginState?
|
||||
@@ -132,6 +136,17 @@ internal class PluginServiceImpl(
|
||||
}
|
||||
}
|
||||
|
||||
override fun getPluginWithState(authority: String): Flow<PluginWithState?> {
|
||||
return repository.get(authority).map {
|
||||
it?.let {
|
||||
PluginWithState(
|
||||
plugin = it,
|
||||
state = getPluginState(it),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun getPluginState(plugin: Plugin): PluginState {
|
||||
val bundle =
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user