Skip to content

Commit 90c8f53

Browse files
committed
🚚 코드리뷰 받은 변수명, 공백 수정
1 parent 7684ebb commit 90c8f53

File tree

10 files changed

+15
-15
lines changed

10 files changed

+15
-15
lines changed

presentation/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,5 @@ dependencies {
7676
implementation "androidx.viewpager2:viewpager2:$viewPager2Version"
7777

7878
// Calendar Library
79-
8079
implementation "com.github.kizitonwose:CalendarView:$calendarVersion"
8180
}

signin/src/main/java/com/whyranoid/SaveLogInUserInfoUseCase.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import javax.inject.Inject
55
class SaveLogInUserInfoUseCase @Inject constructor(
66
private val signInRepository: SignInRepository
77
) {
8-
suspend operator fun invoke(userInfo: User): Boolean {
8+
suspend operator fun invoke(userInfo: SignInUserInfo): Boolean {
99
return signInRepository.saveLogInUserInfo(userInfo)
1010
}
1111
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.whyranoid
22

33
interface SignInDataSource {
4-
suspend fun saveLogInUserInfo(userInfo: User): Boolean
4+
suspend fun saveLogInUserInfo(userInfo: SignInUserInfo): Boolean
55
}

signin/src/main/java/com/whyranoid/SignInDataSourceImpl.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ class SignInDataSourceImpl @Inject constructor(
1717
val profileImgUrl = stringPreferencesKey(PROFILE_IMG_URI)
1818
}
1919

20-
override suspend fun saveLogInUserInfo(userInfo: User): Boolean {
20+
override suspend fun saveLogInUserInfo(userInfo: SignInUserInfo): Boolean {
2121
dataStoreDb.edit { preferences ->
2222
preferences[PreferenceKeys.uid] = userInfo.uid
23-
preferences[PreferenceKeys.email] = userInfo.email ?: ""
24-
preferences[PreferenceKeys.nickName] = userInfo.nickName ?: ""
25-
preferences[PreferenceKeys.profileImgUrl] = userInfo.profileImgUri ?: ""
23+
preferences[PreferenceKeys.email] = userInfo.email ?: EMPTY_STRING
24+
preferences[PreferenceKeys.nickName] = userInfo.nickName ?: EMPTY_STRING
25+
preferences[PreferenceKeys.profileImgUrl] = userInfo.profileImgUri ?: EMPTY_STRING
2626
}
2727
return true
2828
}
@@ -32,5 +32,6 @@ class SignInDataSourceImpl @Inject constructor(
3232
private const val EMAIL_KEY = "email"
3333
private const val NICK_NAME_KEY = "nick_name"
3434
private const val PROFILE_IMG_URI = "profile_img_uri"
35+
private const val EMPTY_STRING = ""
3536
}
3637
}

signin/src/main/java/com/whyranoid/SignInModule.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ abstract class SignInModule {
1212

1313
@Binds
1414
@Singleton
15-
abstract fun bindSignInRepository(impl: SignInRepositoryImpl): SignInRepository
15+
abstract fun bindSignInRepository(signInRepositoryImpl: SignInRepositoryImpl): SignInRepository
1616

1717
@Binds
1818
@Singleton
19-
abstract fun bindSignInDataSource(impl: SignInDataSourceImpl): SignInDataSource
19+
abstract fun bindSignInDataSource(signInDataSourceImpl: SignInDataSourceImpl): SignInDataSource
2020
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.whyranoid
22

33
interface SignInRepository {
4-
suspend fun saveLogInUserInfo(userInfo: User): Boolean
4+
suspend fun saveLogInUserInfo(userInfo: SignInUserInfo): Boolean
55
}

signin/src/main/java/com/whyranoid/SignInRepositoryImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import javax.inject.Inject
55
class SignInRepositoryImpl @Inject constructor(private val signInDataSource: SignInDataSource) :
66
SignInRepository {
77

8-
override suspend fun saveLogInUserInfo(userInfo: User): Boolean {
8+
override suspend fun saveLogInUserInfo(userInfo: SignInUserInfo): Boolean {
99
return signInDataSource.saveLogInUserInfo(userInfo)
1010
}
1111
}

signin/src/main/java/com/whyranoid/User.kt renamed to signin/src/main/java/com/whyranoid/SignInUserInfo.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.whyranoid
22

3-
data class User(
3+
data class SignInUserInfo(
44
val uid: String,
55
val email: String?,
66
val nickName: String?,

signin/src/main/java/com/whyranoid/SignInViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import javax.inject.Inject
88
class SignInViewModel @Inject constructor(
99
private val saveLogInUserInfoUseCase: SaveLogInUserInfoUseCase
1010
) : ViewModel() {
11-
suspend fun saveUserInfo(userInfo: User) {
11+
suspend fun saveUserInfo(userInfo: SignInUserInfo) {
1212
saveLogInUserInfoUseCase(userInfo)
1313
}
1414
}

signin/src/main/java/com/whyranoid/signin/SignInActivity.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import com.google.firebase.auth.FirebaseAuth
1919
import com.google.firebase.auth.GoogleAuthProvider
2020
import com.google.firebase.auth.ktx.auth
2121
import com.google.firebase.ktx.Firebase
22+
import com.whyranoid.SignInUserInfo
2223
import com.whyranoid.SignInViewModel
23-
import com.whyranoid.User
2424
import com.whyranoid.presentation.MainActivity
2525
import com.whyranoid.signin.databinding.ActivitySignInBinding
2626
import dagger.hilt.android.AndroidEntryPoint
@@ -125,7 +125,7 @@ class SignInActivity : AppCompatActivity() {
125125
uid = auth.uid
126126
lifecycleScope.launch {
127127
uid?.let { uid ->
128-
viewModel.saveUserInfo(User(uid, email, nickName, profileImgUri))
128+
viewModel.saveUserInfo(SignInUserInfo(uid, email, nickName, profileImgUri))
129129
}
130130
}
131131

0 commit comments

Comments
 (0)