Add weather plugin specific settings
This commit is contained in:
@@ -25,7 +25,7 @@ interface PluginDao {
|
||||
): Flow<List<PluginEntity>>
|
||||
|
||||
@Query("SELECT * FROM Plugins WHERE authority = :authority")
|
||||
fun get(authority: String): Flow<PluginEntity>
|
||||
fun get(authority: String): Flow<PluginEntity?>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
suspend fun insertMany(plugins: List<PluginEntity>)
|
||||
|
||||
@@ -31,7 +31,7 @@ internal class PluginRepositoryImpl(
|
||||
}
|
||||
|
||||
override fun get(authority: String): Flow<Plugin?> {
|
||||
return dao.get(authority).map { Plugin(it) }
|
||||
return dao.get(authority).map { it?.let { Plugin(it) } }
|
||||
}
|
||||
|
||||
override fun insertMany(plugins: List<Plugin>): Job {
|
||||
|
||||
Reference in New Issue
Block a user