From a1e40a5f26945b81906327199eb8769174cd96be Mon Sep 17 00:00:00 2001 From: Moonsu Kang Date: Mon, 2 Dec 2024 01:54:39 +0900 Subject: [PATCH] feat : implement recent keyword repository impl --- .../RecentKeyWordRepositoryImpl.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 data/search/src/main/java/com/knu/search/repositoryimpl/RecentKeyWordRepositoryImpl.kt diff --git a/data/search/src/main/java/com/knu/search/repositoryimpl/RecentKeyWordRepositoryImpl.kt b/data/search/src/main/java/com/knu/search/repositoryimpl/RecentKeyWordRepositoryImpl.kt new file mode 100644 index 0000000..9b90f1d --- /dev/null +++ b/data/search/src/main/java/com/knu/search/repositoryimpl/RecentKeyWordRepositoryImpl.kt @@ -0,0 +1,20 @@ +package repositoryimpl + +import com.knu.datastore.preferences.SharedPreferencesManager +import com.knu.search.repository.RecentKeyWordRepository +import javax.inject.Inject +import javax.inject.Singleton + +@Singleton +class RecentKeyWordRepositoryImpl @Inject constructor( + private val preferencesManager: SharedPreferencesManager, +) : RecentKeyWordRepository { + + override fun putStringList(key: String, value: List) { + preferencesManager.putStringList(key, value) + } + + override fun getStringList(key: String): List { + return preferencesManager.getStringList(key) + } +}