Skip to content

Commit

Permalink
refactor/#11: Application Context 사용하여 SharedPreferences 초기화
Browse files Browse the repository at this point in the history
  • Loading branch information
youjin09222 committed May 11, 2024
1 parent 012559a commit 3846b36
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package com.sopt.now.compose.data
import android.content.Context

class UserPreference(context: Context) {
private val sharedPreferences = context.getSharedPreferences("userData", Context.MODE_PRIVATE)
private val sharedPreferences = context.applicationContext.getSharedPreferences("userData", Context.MODE_PRIVATE)

// 사용자 아이디 저장
fun saveUserId(userId: String) {
Expand Down

0 comments on commit 3846b36

Please sign in to comment.