Cleans notification pref screen

+ fix troubleshoots
This commit is contained in:
Valere
2019-06-27 12:21:38 +02:00
parent fb43c87107
commit 338de3ebf5
12 changed files with 167 additions and 309 deletions

View File

@ -61,4 +61,6 @@ interface PushersService {
}
fun livePushers(): LiveData<List<Pusher>>
fun pushers() : List<Pusher>
}

View File

@ -503,6 +503,10 @@ internal class DefaultSession(override val sessionParams: SessionParams) : Sessi
return pushersService.livePushers()
}
override fun pushers(): List<Pusher> {
return pushersService.pushers()
}
override fun getPushRules(scope: String): List<PushRule> {
return pushRuleService.getPushRules(scope)
}

View File

@ -97,7 +97,7 @@ internal class DefaultPusherService(
}
override fun removeHttpPusher(pushkey: String, appId: String, callback: MatrixCallback<Unit>) {
val params = RemovePusherTask.Params(sessionParam.credentials.userId,pushkey,appId)
val params = RemovePusherTask.Params(sessionParam.credentials.userId, pushkey, appId)
removePusherTask
.configureWith(params)
.dispatchTo(callback)
@ -111,4 +111,8 @@ internal class DefaultPusherService(
{ it.asDomain() }
)
}
override fun pushers(): List<Pusher> {
return monarchy.fetchAllCopiedSync { PusherEntity.where(it, sessionParam.credentials.userId) }.map { it.asDomain() }
}
}