From dafdc1d3adcfcb449693a18e11137dcb67aafb0b Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 5 Aug 2019 14:47:16 +0200 Subject: [PATCH] Cleaner API --- .../vector/matrix/android/internal/auth/SessionParamsStore.kt | 2 +- .../matrix/android/internal/auth/db/RealmSessionParamsStore.kt | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/SessionParamsStore.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/SessionParamsStore.kt index e7729d3728..9067e8188c 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/SessionParamsStore.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/SessionParamsStore.kt @@ -27,7 +27,7 @@ internal interface SessionParamsStore { fun getAll(): List - fun save(sessionParams: SessionParams): Try + fun save(sessionParams: SessionParams): Try fun delete(userId: String): Try diff --git a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/db/RealmSessionParamsStore.kt b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/db/RealmSessionParamsStore.kt index 1bb27d20fc..38771c91b3 100644 --- a/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/db/RealmSessionParamsStore.kt +++ b/matrix-sdk-android/src/main/java/im/vector/matrix/android/internal/auth/db/RealmSessionParamsStore.kt @@ -62,7 +62,7 @@ internal class RealmSessionParamsStore @Inject constructor(private val mapper: S return sessionParams } - override fun save(sessionParams: SessionParams): Try { + override fun save(sessionParams: SessionParams): Try { return Try { val entity = mapper.map(sessionParams) if (entity != null) { @@ -72,7 +72,6 @@ internal class RealmSessionParamsStore @Inject constructor(private val mapper: S } realm.close() } - sessionParams } }