forked from GitHub-Mirror/riotX-android
Merge branch 'develop' into feature/dagger
This commit is contained in:
@ -61,4 +61,6 @@ interface PushersService {
|
||||
}
|
||||
|
||||
fun livePushers(): LiveData<List<Pusher>>
|
||||
|
||||
fun pushers() : List<Pusher>
|
||||
}
|
@ -191,5 +191,4 @@ internal class DefaultSession @Inject constructor(override val sessionParams: Se
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -37,12 +37,15 @@ internal class BingRuleWatcher @Inject constructor(monarchy: Monarchy,
|
||||
override val query = Monarchy.Query<EventEntity> {
|
||||
|
||||
EventEntity.types(it, listOf(
|
||||
EventType.REDACTION, EventType.MESSAGE, EventType.REDACTION, EventType.ENCRYPTED)
|
||||
EventType.MESSAGE,
|
||||
EventType.REDACTION,
|
||||
EventType.ENCRYPTED)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
override fun processChanges(inserted: List<EventEntity>, updated: List<EventEntity>, deleted: List<EventEntity>) {
|
||||
// TODO Use const for "global"
|
||||
val rules = defaultPushRuleService.getPushRules("global")
|
||||
inserted.map { it.asDomain() }
|
||||
.filter { it.senderId != sessionParams.credentials.userId }
|
||||
|
@ -112,4 +112,8 @@ internal class DefaultPusherService @Inject constructor(
|
||||
{ it.asDomain() }
|
||||
)
|
||||
}
|
||||
|
||||
override fun pushers(): List<Pusher> {
|
||||
return monarchy.fetchAllCopiedSync { PusherEntity.where(it, sessionParam.credentials.userId) }.map { it.asDomain() }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user