From dbd2e963a14149e5a1e4e1307221c861ad884400 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 25 Oct 2020 22:23:24 +0600 Subject: [PATCH] change order of functions in read one to many interface --- .../inmo/micro_utils/repos/OneToManyKeyValueRepo.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/repos/common/src/commonMain/kotlin/dev/inmo/micro_utils/repos/OneToManyKeyValueRepo.kt b/repos/common/src/commonMain/kotlin/dev/inmo/micro_utils/repos/OneToManyKeyValueRepo.kt index 6fe71e2f445..d21048b6db0 100644 --- a/repos/common/src/commonMain/kotlin/dev/inmo/micro_utils/repos/OneToManyKeyValueRepo.kt +++ b/repos/common/src/commonMain/kotlin/dev/inmo/micro_utils/repos/OneToManyKeyValueRepo.kt @@ -43,20 +43,22 @@ interface WriteOneToManyKeyValueRepo : Repo { val onValueRemoved: Flow> val onDataCleared: Flow - @Deprecated("Will be extracted as extension for other add method") - suspend fun add(k: Key, v: Value) suspend fun add(toAdd: Map>) = toAdd.forEach { (k, values) -> values.forEach { v -> add(k, v) } } - @Deprecated("Will be extracted as extension for other remove method") - suspend fun remove(k: Key, v: Value) + @Deprecated("Will be extracted as extension for other add method") + suspend fun add(k: Key, v: Value) + suspend fun remove(toRemove: Map>) = toRemove.forEach { (k, values) -> values.forEach { v -> remove(k, v) } } + @Deprecated("Will be extracted as extension for other remove method") + suspend fun remove(k: Key, v: Value) + suspend fun clear(k: Key) } @Deprecated("Renamed", ReplaceWith("WriteOneToManyKeyValueRepo", "dev.inmo.micro_utils.repos.WriteOneToManyKeyValueRepo"))