Skip to content

Commit d93e954

Browse files
authored
Merge pull request #121 from Nexters/feature/clean-up
[FIX] 마이 페이지 화면 AccessToken 만료, 서버 에러 대응
2 parents b1f940e + b853704 commit d93e954

File tree

20 files changed

+60
-52
lines changed

20 files changed

+60
-52
lines changed

build-logic/src/main/kotlin/com/nexters/ilab/android/Config.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ internal object ApplicationConfig {
44
const val MinSdk = 26
55
const val TargetSdk = 34
66
const val CompileSdk = 34
7-
const val VersionCode = 6
8-
const val VersionName = "1.0.5"
7+
const val VersionCode = 7
8+
const val VersionName = "1.0.6"
99
val JavaVersion = org.gradle.api.JavaVersion.VERSION_17
1010
const val JavaVersionAsInt = 17
1111
}

core/data/src/main/kotlin/com/nexters/ilab/android/core/data/repository/TokenRepositoryImpl.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class TokenRepositoryImpl @Inject constructor(
3131
return dataSource.getUUID()
3232
}
3333

34-
override suspend fun clear() {
35-
dataSource.clear()
34+
override suspend fun clearAuthToken() {
35+
dataSource.clearAuthToken()
3636
}
3737
}

core/datastore/src/main/kotlin/com/nexters/ilab/android/core/datastore/TokenDataSource.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ interface TokenDataSource {
77
suspend fun getAccessToken(): String
88
suspend fun getRefreshToken(): String
99
suspend fun getUUID(): Long
10-
suspend fun clear()
10+
suspend fun clearAuthToken()
1111
}

core/datastore/src/main/kotlin/com/nexters/ilab/android/core/datastore/TokenDataSourceImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class TokenDataSourceImpl @Inject constructor(
5151
else throw exception
5252
}.first()[KEY_REFRESH_TOKEN] ?: ""
5353

54-
override suspend fun clear() {
54+
override suspend fun clearAuthToken() {
5555
dataStore.edit { it.clear() }
5656
}
5757
}

core/designsystem/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ android {
1212
dependencies {
1313
implementations(
1414
libs.androidx.core,
15-
libs.androidx.splash,
1615
libs.coil.compose,
1716
)
1817
}

core/designsystem/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<string name="mypage_name_postfix">님</string>
2525
<string name="mypage_dropdown_delete">삭제하기</string>
2626
<string name="mypage_dropdown_share">공유하기</string>
27+
<string name="mypage_logout">로그인 세션이 종료되어 다시 로그인이 필요합니다.</string>
2728

2829
<!-- Setting -->
2930
<string name="setting_title">설정</string>

core/domain/src/main/kotlin/com/nexters/ilab/android/core/domain/repository/TokenRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ interface TokenRepository {
77
suspend fun getAccessToken(): String
88
suspend fun getRefreshToken(): String
99
suspend fun getUUID(): Long
10-
suspend fun clear()
10+
suspend fun clearAuthToken()
1111
}

feature/intro/src/main/kotlin/com/nexters/ilab/android/feature/intro/IntroActivity.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@ package com.nexters.ilab.android.feature.intro
33
import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
6-
import androidx.activity.viewModels
6+
import androidx.activity.enableEdgeToEdge
77
import androidx.compose.runtime.DisposableEffect
88
import androidx.compose.ui.graphics.Color
9-
import androidx.activity.enableEdgeToEdge
109
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
1110
import com.nexters.ilab.android.core.designsystem.theme.ILabTheme
12-
import com.nexters.ilab.android.feature.intro.viewmodel.IntroViewModel
1311
import com.nexters.ilab.android.feature.navigator.LoginNavigator
1412
import com.nexters.ilab.android.feature.navigator.MainNavigator
1513
import dagger.hilt.android.AndroidEntryPoint
@@ -18,8 +16,6 @@ import javax.inject.Inject
1816

1917
@AndroidEntryPoint
2018
class IntroActivity : ComponentActivity() {
21-
private val viewModel: IntroViewModel by viewModels()
22-
2319
@Inject
2420
lateinit var loginNavigator: LoginNavigator
2521

@@ -58,7 +54,6 @@ class IntroActivity : ComponentActivity() {
5854
withFinish = true,
5955
)
6056
},
61-
viewModel = viewModel,
6257
)
6358
}
6459
}

feature/intro/src/main/kotlin/com/nexters/ilab/android/feature/intro/viewmodel/IntroViewModel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class IntroViewModel @Inject constructor(
3939

4040
fun autoLoginFail() = intent {
4141
viewModelScope.launch {
42-
repository.clear()
42+
repository.clearAuthToken()
4343
postSideEffect(IntroSideEffect.AutoLoginFail)
4444
}
4545
}

feature/login/src/main/kotlin/com/nexters/ilab/android/feature/login/LoginActivity.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,16 @@ import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.setContent
66
import androidx.activity.enableEdgeToEdge
7-
import androidx.activity.viewModels
87
import androidx.compose.runtime.DisposableEffect
98
import androidx.compose.ui.graphics.Color
109
import com.nexters.ilab.android.core.designsystem.theme.ILabTheme
11-
import com.nexters.ilab.android.feature.login.viewmodel.LoginViewModel
1210
import com.nexters.ilab.android.feature.navigator.MainNavigator
1311
import dagger.hilt.android.AndroidEntryPoint
1412
import tech.thdev.compose.exteions.system.ui.controller.rememberExSystemUiController
1513
import javax.inject.Inject
1614

1715
@AndroidEntryPoint
1816
class LoginActivity : ComponentActivity() {
19-
private val viewModel: LoginViewModel by viewModels()
20-
2117
@Inject
2218
lateinit var mainNavigator: MainNavigator
2319

@@ -46,7 +42,6 @@ class LoginActivity : ComponentActivity() {
4642
withFinish = true,
4743
)
4844
},
49-
viewModel = viewModel,
5045
)
5146
}
5247
}

0 commit comments

Comments
 (0)