Skip to content

Chore/316 remove back btn #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions MUMENT-AOS
Submodule MUMENT-AOS added at 7fabd0
45 changes: 23 additions & 22 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {

android {
compileSdk = Apps.compileSdk
buildToolsVersion = "30.0.3"
buildToolsVersion = "31.0.0"

defaultConfig {
applicationId = Apps.pacakageName
Expand Down Expand Up @@ -59,6 +59,7 @@ android {
dataBinding = true
viewBinding = true
}
namespace = "com.playtogether_android.app"
}


Expand Down Expand Up @@ -88,16 +89,16 @@ dependencies {
implementation(project(":data"))

//bad request log detail show
implementation("com.squareup.okhttp3:logging-interceptor:4.9.3")
implementation("com.squareup.okhttp3:logging-interceptor:4.10.0")

//sercurity
implementation("androidx.security:security-crypto-ktx:1.1.0-alpha03")
implementation("androidx.security:security-crypto-ktx:1.1.0-alpha04")

//kakao login
implementation("com.kakao.sdk:v2-user:2.9.0")

//google login
implementation("com.google.android.gms:play-services-auth:20.2.0")
implementation("com.google.android.gms:play-services-auth:20.4.1")

//moshi
implementation("com.squareup.moshi:moshi-kotlin:1.12.0")
Expand All @@ -110,10 +111,10 @@ dependencies {


//ViewModel
implementation("androidx.navigation:navigation-fragment-ktx:2.4.2")
implementation("androidx.navigation:navigation-ui-ktx:2.4.2")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.4.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1")
implementation("androidx.navigation:navigation-fragment-ktx:2.5.3")
implementation("androidx.navigation:navigation-ui-ktx:2.5.3")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.5.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1")
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.2")


Expand All @@ -131,15 +132,15 @@ dependencies {
// SwipeRefreshLayout
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01")
implementation("com.github.nabil6391:LottieSwipeRefreshLayout:1.0.0")
implementation("com.airbnb.android:lottie:5.0.2")
implementation("com.airbnb.android:lottie:5.2.0")

// Glide
implementation(ThirdPartyDependencies.glide)
implementation("androidx.appcompat:appcompat:1.4.1")
implementation("androidx.constraintlayout:constraintlayout:2.1.3")
implementation("androidx.appcompat:appcompat:1.6.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.legacy:legacy-support-v4:1.0.0")
implementation("androidx.security:security-crypto:1.1.0-alpha03")
implementation("com.github.bumptech.glide:okhttp3-integration:4.11.0")
implementation("androidx.security:security-crypto:1.1.0-alpha04")
// implementation("com.github.bumptech.glide:okhttp3-integration:4.11.0")

// Navigation
implementation(AndroidXDependencies.navigation)
Expand All @@ -165,8 +166,8 @@ dependencies {
androidTestImplementation(TestDependencies.espresso)

//coroutine
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4")

//CardView
implementation(AndroidXDependencies.cardview)
Expand All @@ -176,12 +177,12 @@ dependencies {
implementation("androidx.lifecycle:lifecycle-extensions:2.2.0")

//annotation
implementation("org.jetbrains:annotations:15.0")
implementation("androidx.annotation:annotation:1.3.0")
implementation("org.jetbrains:annotations:20.1.0")
implementation("androidx.annotation:annotation:1.5.0")

// hilt
implementation("com.google.dagger:hilt-android:2.41")
kapt("com.google.dagger:hilt-android-compiler:2.41")
implementation("com.google.dagger:hilt-android:2.42")
kapt("com.google.dagger:hilt-android-compiler:2.42")

//koin
implementation("io.insert-koin:koin-core:3.1.2")
Expand All @@ -191,7 +192,7 @@ dependencies {


//bottomsheet
implementation("com.google.android.material:material:1.4.0")
implementation("com.google.android.material:material:1.8.0")

//google
implementation(platform("com.google.firebase:firebase-bom:29.1.0")) // Firebase BoM
Expand All @@ -200,7 +201,7 @@ dependencies {
implementation("com.google.firebase:firebase-analytics-ktx")
implementation("com.google.firebase:firebase-crashlytics-ktx")

implementation("androidx.work:work-runtime:2.8.0-alpha01")
implementation("androidx.work:work-runtime-ktx:2.7.1")


//dot indicator
Expand All @@ -221,7 +222,7 @@ dependencies {
}

//okhttp websocket
implementation("com.squareup.okhttp3:okhttp:3.12.12")
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.2")

//gson
implementation("com.google.code.gson:gson:2.9.0")
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.playtogether_android.app">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import retrofit2.create
import timber.log.Timber
import javax.inject.Singleton

@Module
Expand Down Expand Up @@ -136,7 +137,7 @@ object ApiModule {
addInterceptor(provideInterceptor())
addInterceptor(AuthInterceptor())
build()
Log.e("TEST", "μ°νžˆλ‚˜")
// Timber.e("TEST provideOkHttpClient")
}

@Singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package com.playtogether_android.app.di
import com.google.gson.GsonBuilder
import com.playtogether_android.app.BuildConfig
import com.playtogether_android.app.util.AuthInterceptor
import com.playtogether_android.app.util.MyAuthenticator
import com.playtogether_android.app.util.RefreshTokenInterceptor
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import okhttp3.*
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
Expand Down Expand Up @@ -37,7 +39,7 @@ object RetrofitModule {
.readTimeout(30, TimeUnit.SECONDS)
.addInterceptor(httpLoggingInterceptor())
.addInterceptor(AuthInterceptor())
// .authenticator(MyAuthenticator())
.addInterceptor(RefreshTokenInterceptor(CoroutineScope(Dispatchers.Default)))
.build()

@GsonConverter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ class OnBoardingIntroduceActivity :
}



private fun isOpenerCheck() {

val crewName = intent.getStringExtra("crewName")
Expand All @@ -111,9 +112,37 @@ class OnBoardingIntroduceActivity :
val crewId = intent.getIntExtra("crewId", 1)
val isOpener = intent.getBooleanExtra("isOpener", false)


val name = binding.etIntroOnboardingName.text.toString()
binding.tvIntroOnboardingCrewName.text = crewName
if (isOpener) {
val nickName = binding.etIntroOnboardingName.text.toString()
val description = binding.etIntroOnboardingIntro.text.toString()
val list = intent.getStringArrayListExtra("ChipList")
if (list?.size != null) {
for (i in 0 until list.size) {
val chip = Chip(binding.chipMypage.context).apply {
text = list[i]
Timber.e("TEST ${list[i]}")
firstSubway = list[0]
if (list.size < 2) {
secondSubway = null
} else {
secondSubway = list[1]
}
}
}
}

onBoardingViewModel.putAddProfile(
AddProfileItem(
description,
firstSubway,
nickName,
secondSubway
), intent.getIntExtra("crewId", 1)
)

val intent = Intent(this, OpenCrewEndOnBoardingActivity::class.java).apply {
putExtra("nickname", name)
putExtra("crewName", crewName)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class SelectOnboardingActivity :
BaseActivity<ActivitySelectOnboardingBinding>(R.layout.activity_select_onboarding) {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
initBackBtn()
//initBackBtn()
initOpenBtnClickListener()
initJoinBtnClickListener()
movePage()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class OnBoardingViewModel @Inject constructor(
registerCrew.message.toString()
)
}
else -> {}
}
Timber.d("registerCrew : ${_registerCrew.value.toString()}")
}
Expand Down Expand Up @@ -187,6 +188,7 @@ class OnBoardingViewModel @Inject constructor(
nicknameDuplicationCheck.value =
NickNameDuplicationData(nicknameDuplication.code!!, false)
}
else -> {}
}
Timber.d("nicknameDuplication: ${nicknameDuplicationCheck.value.toString()}")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class MyInfoFragment : BaseFragment<FragmentMyInfoBinding>(R.layout.fragment_my_

private fun clickEvent() {
moveSettingView()
// moveEditProfile()
moveEditProfile()
moveManageCrew()
moveWebPage()
moveEditProfileImage()
Expand Down Expand Up @@ -133,35 +133,36 @@ class MyInfoFragment : BaseFragment<FragmentMyInfoBinding>(R.layout.fragment_my_
}


//ν”„λ‘œν•„ μˆ˜μ •ν•˜κΈ° μ˜¨λ³΄λ”© λ·° 이동
// private fun moveEditProfile() {
// binding.tvProfileEdit.setOnClickListener {
// val intent = Intent(requireActivity(), EditProfileActivity::class.java)
// val list = arrayListOf<String>()
// ν”„λ‘œν•„ μˆ˜μ •ν•˜κΈ° μ˜¨λ³΄λ”© λ·° 이동
private fun moveEditProfile() {
binding.tvProfileEdit.setOnClickListener {
val intent = Intent(requireActivity(), EditProfileActivity::class.java)
val list = arrayListOf<String>()
// Timber.e("121111 : ${binding.firstStation}")
// Timber.e("121111 : ${binding.secondStation}")
// if (binding.firstStation != null && binding.firstStation != "μ§€ν•˜μ² μ—­ λ―Έμ§€μ •") {
// list.add(binding.firstStation.toString())
// }
// if (binding.secondStation != null) {
// list.add(binding.secondStation.toString())
// }
// if (list != null) {
// if (list.size != 0) {
// intent.putExtra("ChipList", list)
// }
// }
// intent.putExtra("crewName", PlayTogetherRepository.crewName)
// intent.putExtra("nickname", binding.nickname)
// intent.putExtra("description", binding.description)
// intent.putExtra("firstStation", binding.firstStation)
// intent.putExtra("secondStation", binding.secondStation)
//
//
// //todo μ˜¨λ³΄λ”©λ·° 이동 μ‹œ λ„˜κ²¨μ€„ κ°’ μΆ”κ°€
// startActivity(intent)
// }
// }
val firstStation = binding.tvSubwayFirst.text.toString()
val secondStation = binding.tvSubwaySecond.text.toString()

if (firstStation.isNotBlank() && firstStation != "μ§€ν•˜μ² μ—­ λ―Έμ§€μ •") {
list.add(firstStation)
}
if (secondStation.isNotBlank()) {
list.add(secondStation)
}
if (list.isNotEmpty()) {
intent.putExtra("ChipList", list)
}

intent.putExtra("crewName", PlayTogetherRepository.crewName)
intent.putExtra("nickname", binding.tvUserName.text.toString())
intent.putExtra("description", binding.tvUserIntroduction.text.toString())
intent.putExtra("firstStation", firstStation)
intent.putExtra("secondStation", secondStation)

//todo μ˜¨λ³΄λ”©λ·° 이동 μ‹œ λ„˜κ²¨μ€„ κ°’ μΆ”κ°€
startActivity(intent)
}
}

//λ‚΄ 동아리 κ΄€λ¦¬ν•˜κΈ° 이동뷰 이동
private fun moveManageCrew() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@ class AuthInterceptor : Interceptor {
}

override fun intercept(chain: Interceptor.Chain): Response {

val request = chain.request().newBuilder()
val response = doRequest(chain)
if (response.code == 401) {
Timber.e("need refresh")
runBlocking {
test(response)
}
}
return response
.addHeader("Authorization", PlayTogetherRepository.userToken)
.build()
return chain.proceed(request)
//return chain.proceed(request.build())


Expand All @@ -38,20 +32,6 @@ class AuthInterceptor : Interceptor {
// return response
}

private fun test1() {

}

private fun test(response: Response) {
val isRefresh = TokenManager().getRefreshToken().isCompleted
if (isRefresh) {
Timber.d("code 200 μž¬λ°œκΈ‰")
response.request.newBuilder()
.header("Authorization", PlayTogetherRepository.userToken)
.build()
}
}

private fun doRequest(chain: Interceptor.Chain): Response {
val request = chain.request()
Timber.d("request : $request")
Expand Down
Loading