fix: 앱 실행시 처음 실행하는 유저 정보 조회

- point를 가져와서 SharedPreferences에 저장
This commit is contained in:
2025-05-20 18:03:28 +09:00
parent 23494d0936
commit 5dbf9bd987
4 changed files with 9 additions and 0 deletions

View File

@@ -2,6 +2,7 @@ package kr.co.vividnext.sodalive.common
object Constants {
const val PREF_CAN = "pref_can"
const val PREF_POINT = "pref_point"
const val PREF_TOKEN = "pref_token"
const val PREF_EMAIL = "pref_email"
const val PREF_USER_ID = "pref_user_id"

View File

@@ -99,6 +99,12 @@ object SharedPreferenceManager {
sharedPreferences[Constants.PREF_CAN] = value
}
var point: Int
get() = sharedPreferences[Constants.PREF_POINT, 0]
set(value) {
sharedPreferences[Constants.PREF_POINT] = value
}
var role: String
get() = sharedPreferences[Constants.PREF_USER_ROLE, MemberRole.USER.name]
set(value) {