Skip to content

Commit

Permalink
Merge pull request #141 from pknu-wap/#139/refactor/tgyuu/changeNickn…
Browse files Browse the repository at this point in the history
…ame,withdrawaleEhancement

#139 refact removeTokens() 로직 보완
  • Loading branch information
tgyuuAn authored Jun 7, 2023
2 parents a2ce2aa + 7b6fca4 commit ea878c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class TokenDataSourceImpl @Inject constructor(
tokenDataStore.updateData {
it.toBuilder().clear().build()
}
updateTokenState()
}

private fun updateTokenState() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.android.mediproject.core.datastore

import android.util.Log
import com.android.mediproject.core.model.remote.token.NewTokensFromAws
import kotlinx.coroutines.channels.BufferOverflow
import kotlinx.coroutines.flow.MutableSharedFlow
Expand All @@ -19,7 +20,8 @@ class TokenServerImpl @Inject constructor() : TokenServer {
*/
override val currentTokens: EndpointTokenState
get() {
val token = tokens.replayCache.firstOrNull()
val token = tokens.replayCache.lastOrNull()
Log.d("wap","TokenServer currentTokens () : token값 : "+token.toString())
return if (token == null) {
EndpointTokenState.NoToken
} else {
Expand Down

0 comments on commit ea878c5

Please sign in to comment.