This commit is contained in:
Benoit Marty 2019-09-20 16:42:28 +02:00
parent faa8e6bbb2
commit d25cf79b07
2 changed files with 1 additions and 4 deletions

View file

@ -58,8 +58,6 @@ internal class DefaultPushRuleService @Inject constructor(private val getPushRul
var underrideRules: List<PushRule> = emptyList()
monarchy.doWithRealm { realm ->
// FIXME PushRulesEntity are not always created here...
// FIWME Get the push rules from the sync
PushRulesEntity.where(realm, scope, RuleSetKey.CONTENT)
.findFirst()
?.let { pushRulesEntity ->

View file

@ -37,8 +37,7 @@ internal class DefaultSavePushRulesTask @Inject constructor(private val monarchy
override suspend fun execute(params: SavePushRulesTask.Params) {
monarchy.awaitTransaction { realm ->
//clear existings?
//TODO
// clear current push rules
realm.where(PushRulesEntity::class.java)
.findAll()
.deleteAllFromRealm()