From 079ffca0ba5a9ac9da192b278ee4403c6a8dbe2a Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 16:06:39 +0900 Subject: [PATCH 01/14] =?UTF-8?q?[Chore/#98]=20=EB=8B=A4=ED=81=AC=EB=AA=A8?= =?UTF-8?q?=EB=93=9C=20=ED=95=A8=EC=88=98=EB=A1=9C=20=EB=B9=BC=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/sopt/umbba_android/application/UmbbaApplication.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/sopt/umbba_android/application/UmbbaApplication.kt b/app/src/main/java/com/sopt/umbba_android/application/UmbbaApplication.kt index e5bcad97..ac3e80e5 100644 --- a/app/src/main/java/com/sopt/umbba_android/application/UmbbaApplication.kt +++ b/app/src/main/java/com/sopt/umbba_android/application/UmbbaApplication.kt @@ -9,9 +9,9 @@ import com.sopt.umbba_android.data.local.SharedPreferences class UmbbaApplication: Application() { override fun onCreate() { super.onCreate() - AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO) initKakao() setupSharedPreferences() + stopDarkMode() } private fun initKakao() { @@ -21,4 +21,8 @@ class UmbbaApplication: Application() { private fun setupSharedPreferences() { SharedPreferences.init(this) } + + private fun stopDarkMode() { + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO) + } } \ No newline at end of file From 680cfeefd2e7b9c2a1d930807e9a4f49a4ddf812 Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 16:15:52 +0900 Subject: [PATCH 02/14] =?UTF-8?q?[Delete/#98]=20=EC=98=88=EC=8B=9C=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datasource/ExampleDateSource.kt | 13 ------------- .../data/model/request/ExampleRequestDto.kt | 9 --------- .../data/model/response/ExampleResponseDto.kt | 10 ---------- .../data/repository/ExampleRepositoryImpl.kt | 14 -------------- .../umbba_android/data/service/ExampleService.kt | 15 --------------- .../domain/repository/ExampleRepository.kt | 9 --------- .../presentation/list/ListQuestionAdapter.kt | 2 -- 7 files changed, 72 deletions(-) delete mode 100644 app/src/main/java/com/sopt/umbba_android/data/datasource/ExampleDateSource.kt delete mode 100644 app/src/main/java/com/sopt/umbba_android/data/model/request/ExampleRequestDto.kt delete mode 100644 app/src/main/java/com/sopt/umbba_android/data/model/response/ExampleResponseDto.kt delete mode 100644 app/src/main/java/com/sopt/umbba_android/data/repository/ExampleRepositoryImpl.kt delete mode 100644 app/src/main/java/com/sopt/umbba_android/data/service/ExampleService.kt delete mode 100644 app/src/main/java/com/sopt/umbba_android/domain/repository/ExampleRepository.kt diff --git a/app/src/main/java/com/sopt/umbba_android/data/datasource/ExampleDateSource.kt b/app/src/main/java/com/sopt/umbba_android/data/datasource/ExampleDateSource.kt deleted file mode 100644 index 800a9a9b..00000000 --- a/app/src/main/java/com/sopt/umbba_android/data/datasource/ExampleDateSource.kt +++ /dev/null @@ -1,13 +0,0 @@ -package com.sopt.umbba_android.data.datasource - -import com.sopt.umbba_android.data.service.ExampleService -import com.sopt.umbba_android.data.model.request.ExampleRequestDto -import com.sopt.umbba_android.data.model.response.ExampleResponseDto -import com.sopt.umbba_android.data.model.response.wrapper.BaseResponse - -class ExampleDateSource( - private val exampleService: ExampleService -) { - suspend fun postExample(exampleRequestDto: ExampleRequestDto): BaseResponse = - exampleService.postExample(exampleRequestDto) -} \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/data/model/request/ExampleRequestDto.kt b/app/src/main/java/com/sopt/umbba_android/data/model/request/ExampleRequestDto.kt deleted file mode 100644 index ddff9ab9..00000000 --- a/app/src/main/java/com/sopt/umbba_android/data/model/request/ExampleRequestDto.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.sopt.umbba_android.data.model.request - -import kotlinx.serialization.Serializable - -@Serializable -data class ExampleRequestDto( - val id: String, - val pw: String -) diff --git a/app/src/main/java/com/sopt/umbba_android/data/model/response/ExampleResponseDto.kt b/app/src/main/java/com/sopt/umbba_android/data/model/response/ExampleResponseDto.kt deleted file mode 100644 index ea6c8313..00000000 --- a/app/src/main/java/com/sopt/umbba_android/data/model/response/ExampleResponseDto.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.sopt.umbba_android.data.model.response - -import kotlinx.serialization.Serializable - -@Serializable -data class ExampleResponseDto( - val id: Int, - val title: String, - val content: String -) \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/data/repository/ExampleRepositoryImpl.kt b/app/src/main/java/com/sopt/umbba_android/data/repository/ExampleRepositoryImpl.kt deleted file mode 100644 index 07d7fe20..00000000 --- a/app/src/main/java/com/sopt/umbba_android/data/repository/ExampleRepositoryImpl.kt +++ /dev/null @@ -1,14 +0,0 @@ -package com.sopt.umbba_android.data.repository - -import com.sopt.umbba_android.data.datasource.ExampleDateSource -import com.sopt.umbba_android.data.model.request.ExampleRequestDto -import com.sopt.umbba_android.data.model.response.ExampleResponseDto -import com.sopt.umbba_android.data.model.response.wrapper.BaseResponse -import com.sopt.umbba_android.domain.repository.ExampleRepository - -class ExampleRepositoryImpl( - private val exampleDateSource: ExampleDateSource -) : ExampleRepository { - override suspend fun postExample(exampleRequestDto: ExampleRequestDto): Result> = - kotlin.runCatching { exampleDateSource.postExample(exampleRequestDto) } -} \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/data/service/ExampleService.kt b/app/src/main/java/com/sopt/umbba_android/data/service/ExampleService.kt deleted file mode 100644 index a0dd9ee8..00000000 --- a/app/src/main/java/com/sopt/umbba_android/data/service/ExampleService.kt +++ /dev/null @@ -1,15 +0,0 @@ -package com.sopt.umbba_android.data.service - -import com.sopt.umbba_android.data.model.request.ExampleRequestDto -import com.sopt.umbba_android.data.model.response.ExampleResponseDto -import com.sopt.umbba_android.data.model.response.wrapper.BaseResponse -import retrofit2.http.Body -import retrofit2.http.POST - -interface ExampleService { - // 예시 API - @POST("api/example") - suspend fun postExample( - @Body request: ExampleRequestDto - ): BaseResponse -} \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/domain/repository/ExampleRepository.kt b/app/src/main/java/com/sopt/umbba_android/domain/repository/ExampleRepository.kt deleted file mode 100644 index f69f36f7..00000000 --- a/app/src/main/java/com/sopt/umbba_android/domain/repository/ExampleRepository.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.sopt.umbba_android.domain.repository - -import com.sopt.umbba_android.data.model.request.ExampleRequestDto -import com.sopt.umbba_android.data.model.response.ExampleResponseDto -import com.sopt.umbba_android.data.model.response.wrapper.BaseResponse - -interface ExampleRepository { - suspend fun postExample(exampleRequestDto: ExampleRequestDto): Result> -} \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt b/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt index 61078fbb..633aefd8 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt @@ -1,12 +1,10 @@ package com.sopt.umbba_android.presentation.list -import android.util.Log import android.view.LayoutInflater import android.view.ViewGroup import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView -import com.sopt.umbba_android.data.model.response.ExampleResponseDto import com.sopt.umbba_android.data.model.response.ListResponseDto import com.sopt.umbba_android.databinding.ItemQuestionListBinding import timber.log.Timber From bce8433c81190335cd4cb6e2c8bceda5291acbc4 Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 16:23:39 +0900 Subject: [PATCH 03/14] =?UTF-8?q?[Feat/#98]=20Timber=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sopt/umbba_android/application/UmbbaApplication.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/com/sopt/umbba_android/application/UmbbaApplication.kt b/app/src/main/java/com/sopt/umbba_android/application/UmbbaApplication.kt index ac3e80e5..f9b8b05e 100644 --- a/app/src/main/java/com/sopt/umbba_android/application/UmbbaApplication.kt +++ b/app/src/main/java/com/sopt/umbba_android/application/UmbbaApplication.kt @@ -3,8 +3,10 @@ package com.sopt.umbba_android.application import android.app.Application import androidx.appcompat.app.AppCompatDelegate import com.kakao.sdk.common.KakaoSdk +import com.sopt.umbba_android.BuildConfig import com.sopt.umbba_android.BuildConfig.KAKAO_NATIVE_APP_KEY import com.sopt.umbba_android.data.local.SharedPreferences +import timber.log.Timber class UmbbaApplication: Application() { override fun onCreate() { @@ -12,6 +14,7 @@ class UmbbaApplication: Application() { initKakao() setupSharedPreferences() stopDarkMode() + useTimber() } private fun initKakao() { @@ -25,4 +28,10 @@ class UmbbaApplication: Application() { private fun stopDarkMode() { AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO) } + + private fun useTimber() { + if (BuildConfig.DEBUG) { + Timber.plant(Timber.DebugTree()) + } + } } \ No newline at end of file From 972f4c98a5731206090fe7046739c3ad069fab13 Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 16:40:52 +0900 Subject: [PATCH 04/14] =?UTF-8?q?[Chore/#98]=20SingleClickListener=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/home/HomeFragment.kt | 4 ++-- .../home/InviteCodeDialogFragment.kt | 10 ++++------ .../presentation/invite/InviteActivity.kt | 5 +++-- .../presentation/invite/InviteCodeActivity.kt | 3 ++- .../presentation/list/ListFragment.kt | 11 ++++++----- .../presentation/list/ListQuestionAdapter.kt | 3 ++- .../login/AgreePrivacyUseActivity.kt | 11 ++++++----- .../presentation/login/LoginActivity.kt | 3 ++- .../onboarding/CommunicationActivity.kt | 3 ++- .../onboarding/InputInfoActivity.kt | 3 ++- .../onboarding/NotifyTimeActivity.kt | 7 ++----- .../onboarding/OnboardingFinishActivity.kt | 7 ++++--- .../onboarding/SelectFamilyActivity.kt | 3 ++- .../presentation/onboarding/SetTimeActivity.kt | 3 ++- .../onboarding/quest/QuestActivity.kt | 3 ++- .../presentation/qna/AnswerActivity.kt | 1 - .../qna/BackAnswerDialogFragment.kt | 6 +++--- .../qna/ConfirmAnswerDialogFragment.kt | 7 +++---- .../qna/NoOpponentDialogFragment.kt | 3 ++- .../presentation/qna/QuestionAnswerActivity.kt | 6 +++--- .../setting/DeleteAccountActivity.kt | 6 ++---- .../setting/DeleteAccountDialogFragment.kt | 9 +++------ .../setting/ManageAccountActivity.kt | 7 +++---- .../presentation/setting/SettingFragment.kt | 9 +++++---- .../sopt/umbba_android/util/ViewExtension.kt | 17 +++++++++++++++++ 25 files changed, 84 insertions(+), 66 deletions(-) create mode 100644 app/src/main/java/com/sopt/umbba_android/util/ViewExtension.kt diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt index e0e44a18..4e28014c 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/home/HomeFragment.kt @@ -2,7 +2,6 @@ package com.sopt.umbba_android.presentation.home import android.content.Intent import android.os.Bundle -import android.util.Log import android.view.View import androidx.fragment.app.viewModels import coil.load @@ -14,6 +13,7 @@ import com.sopt.umbba_android.presentation.qna.NoOpponentDialogFragment import com.sopt.umbba_android.presentation.qna.QuestionAnswerActivity import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingFragment +import com.sopt.umbba_android.util.setOnSingleClickListener class HomeFragment : BindingFragment(R.layout.fragment_home) { private val viewModel: HomeViewModel by viewModels { ViewModelFactory(requireActivity()) } @@ -23,7 +23,7 @@ class HomeFragment : BindingFragment(R.layout.fragment_home observeData() } private fun setClickEvent(responseCaseDto: HomeCaseResponseDto.HomeCaseData) { - binding.btnAnswer.setOnClickListener { + binding.btnAnswer.setOnSingleClickListener { viewModel.getResponseCase() when (responseCaseDto.responseCase) { 1 -> startActivity(Intent(requireActivity(), QuestionAnswerActivity::class.java)) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt index acb06a3c..04bc8883 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt @@ -2,7 +2,6 @@ package com.sopt.umbba_android.presentation.home import android.content.ClipData import android.content.ClipboardManager -import android.content.Context import android.content.Context.CLIPBOARD_SERVICE import android.graphics.Color import android.graphics.drawable.ColorDrawable @@ -13,7 +12,6 @@ import android.view.View import android.view.ViewGroup import android.view.WindowManager import android.widget.Toast -import androidx.core.content.ContextCompat.getSystemService import androidx.fragment.app.DialogFragment import com.google.android.material.snackbar.Snackbar import com.kakao.sdk.share.ShareClient @@ -21,8 +19,8 @@ import com.kakao.sdk.template.model.Button import com.kakao.sdk.template.model.Content import com.kakao.sdk.template.model.FeedTemplate import com.kakao.sdk.template.model.Link -import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.FragmentInviteCodeDialogBinding +import com.sopt.umbba_android.util.setOnSingleClickListener class InviteCodeDialogFragment(private val inviteUserName: String, private val inviteCode: String) : DialogFragment() { @@ -47,7 +45,7 @@ class InviteCodeDialogFragment(private val inviteUserName: String, private val i } private fun closeDialog() { - binding.btnClose.setOnClickListener { + binding.btnClose.setOnSingleClickListener { dismiss() } } @@ -61,7 +59,7 @@ class InviteCodeDialogFragment(private val inviteUserName: String, private val i } private fun copyInviteCode() { - binding.clCopyInviteCode.setOnClickListener { + binding.clCopyInviteCode.setOnSingleClickListener { val clipboard: ClipboardManager = requireActivity().getSystemService(CLIPBOARD_SERVICE) as ClipboardManager val clip = ClipData.newPlainText("label", binding.tvInviteCode.text) @@ -71,7 +69,7 @@ class InviteCodeDialogFragment(private val inviteUserName: String, private val i } private fun sendInviteCodeWithKakao(inviteUserName: String, inviteCode: String) { - binding.btnSendInvitation.setOnClickListener { + binding.btnSendInvitation.setOnSingleClickListener { val defaultFeed = FeedTemplate( content = Content( title = "${inviteUserName}으로부터 초대가 왔어요.\n초대 코드 : $inviteCode", diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteActivity.kt index 2b40260b..c69fcb6c 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteActivity.kt @@ -8,6 +8,7 @@ import com.sopt.umbba_android.databinding.ActivityInviteBinding import com.sopt.umbba_android.domain.entity.User import com.sopt.umbba_android.presentation.onboarding.CommunicationActivity import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener class InviteActivity : BindingActivity(R.layout.activity_invite) { @@ -20,7 +21,7 @@ class InviteActivity : BindingActivity(R.layout.activity_ private fun goCommunicationActivity() { // 초대하는 측 - binding.btnStart.setOnClickListener { + binding.btnStart.setOnSingleClickListener { val userData = User(isReceiver = false) Log.e("yeonjin", "invite parcelable : ${userData.isReceiver}") startActivity(Intent(this, CommunicationActivity::class.java).apply { @@ -31,7 +32,7 @@ class InviteActivity : BindingActivity(R.layout.activity_ private fun goInviteCodeActivity() { // 초대받는 측 - binding.btnInputCode.setOnClickListener { + binding.btnInputCode.setOnSingleClickListener { val userData = User(isReceiver = true) Log.e("yeonjin", "invite parcelable : ${userData.isReceiver}") startActivity(Intent(this, InviteCodeActivity::class.java).apply { diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt index 0aea1231..16d99d83 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt @@ -18,6 +18,7 @@ import com.sopt.umbba_android.presentation.login.LoginActivity.Companion.DID_USE import com.sopt.umbba_android.presentation.onboarding.CommunicationActivity import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener import java.util.regex.Pattern class InviteCodeActivity : @@ -72,7 +73,7 @@ class InviteCodeActivity : } private fun setFamilyToInviteCode() { - binding.btnNext.setOnClickListener { + binding.btnNext.setOnSingleClickListener { val code = binding.etCode.text.toString() Log.e("yeonjin", "초대코드 입력 : $code") viewModel.setFamily(code) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/list/ListFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/list/ListFragment.kt index 8eab0b03..fe0b1005 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/list/ListFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/list/ListFragment.kt @@ -11,6 +11,7 @@ import com.sopt.umbba_android.presentation.list.viewmodel.ListViewModel import com.sopt.umbba_android.presentation.qna.QuestionAnswerActivity import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingFragment +import com.sopt.umbba_android.util.setOnSingleClickListener class ListFragment : BindingFragment(R.layout.fragment_list) { private val viewModel: ListViewModel by viewModels { ViewModelFactory(requireActivity()) } @@ -40,27 +41,27 @@ class ListFragment : BindingFragment(R.layout.fragment_list private fun setChipClickEvent() { with(binding) { - chip1.setOnClickListener { + chip1.setOnSingleClickListener { viewModel.getListData(1) tvSection.text = chip1.text ivImage.load(R.drawable.bg_list_img1) } - chip2.setOnClickListener { + chip2.setOnSingleClickListener { viewModel.getListData(2) tvSection.text = chip2.text ivImage.load(R.drawable.bg_list_img2) } - chip3.setOnClickListener { + chip3.setOnSingleClickListener { viewModel.getListData(3) tvSection.text = chip3.text ivImage.load(R.drawable.bg_list_img3) } - chip4.setOnClickListener { + chip4.setOnSingleClickListener { viewModel.getListData(4) tvSection.text = chip4.text ivImage.load(R.drawable.bg_list_img4) } - chip5.setOnClickListener { + chip5.setOnSingleClickListener { viewModel.getListData(5) tvSection.text = chip5.text ivImage.load(R.drawable.bg_list_img5) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt b/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt index 633aefd8..28b60d1f 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt @@ -7,6 +7,7 @@ import androidx.recyclerview.widget.ListAdapter import androidx.recyclerview.widget.RecyclerView import com.sopt.umbba_android.data.model.response.ListResponseDto import com.sopt.umbba_android.databinding.ItemQuestionListBinding +import com.sopt.umbba_android.util.setOnSingleClickListener import timber.log.Timber class ListQuestionAdapter(private val itemClick: (ListResponseDto.ListData) -> (Unit)) : @@ -30,7 +31,7 @@ class ListQuestionAdapter(private val itemClick: (ListResponseDto.ListData) -> ( with(binding) { tvIndex.text = data.index.toString() tvTopic.text = data.topic - root.setOnClickListener { + root.setOnSingleClickListener { itemClick(data) Timber.e("아이템 클릭 이벤트 발생") } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt index 2bc71b70..67a60a8a 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt @@ -13,6 +13,7 @@ import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.ActivityAgreePrivacyUseBinding import com.sopt.umbba_android.presentation.invite.InviteActivity import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener import java.util.regex.Pattern class AgreePrivacyUseActivity : BindingActivity(R.layout.activity_agree_privacy_use) { @@ -29,7 +30,7 @@ class AgreePrivacyUseActivity : BindingActivity( private fun clickAllAgreeButton() { with(binding) { - btnAllAgreeCheck.setOnClickListener { + btnAllAgreeCheck.setOnSingleClickListener { btnAllAgreeCheck.isSelected = !btnAllAgreeCheck.isSelected checkAllAgreeButton() } @@ -54,15 +55,15 @@ class AgreePrivacyUseActivity : BindingActivity( private fun clickCircleButton() { with(binding) { - btnUp14.setOnClickListener { + btnUp14.setOnSingleClickListener { btnUp14.isSelected = !btnUp14.isSelected checkAllCircleButton() } - btnAgreeTermsAndCondition.setOnClickListener { + btnAgreeTermsAndCondition.setOnSingleClickListener { btnAgreeTermsAndCondition.isSelected = !btnAgreeTermsAndCondition.isSelected checkAllCircleButton() } - btnAgreePrivacy.setOnClickListener { + btnAgreePrivacy.setOnSingleClickListener { btnAgreePrivacy.isSelected = !btnAgreePrivacy.isSelected checkAllCircleButton() } @@ -115,7 +116,7 @@ class AgreePrivacyUseActivity : BindingActivity( } private fun goInviteActivity() { - binding.btnNext.setOnClickListener { + binding.btnNext.setOnSingleClickListener { startActivity(Intent(this, InviteActivity::class.java)) } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/login/LoginActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/login/LoginActivity.kt index 5403a477..87429394 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/login/LoginActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/login/LoginActivity.kt @@ -18,6 +18,7 @@ import com.sopt.umbba_android.presentation.login.viewmodel.LoginViewModel import com.sopt.umbba_android.presentation.onboarding.InputInfoActivity import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener class LoginActivity : BindingActivity(R.layout.activity_login) { @@ -49,7 +50,7 @@ class LoginActivity : BindingActivity(R.layout.activity_lo } } - binding.btnKakaoLogin.setOnClickListener { + binding.btnKakaoLogin.setOnSingleClickListener { if (UserApiClient.instance.isKakaoTalkLoginAvailable(this)) { UserApiClient.instance.loginWithKakaoTalk(this) { token, error -> if (error != null) { diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/CommunicationActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/CommunicationActivity.kt index 917371c3..7fd48d50 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/CommunicationActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/CommunicationActivity.kt @@ -8,6 +8,7 @@ import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.ActivityCommunicationBinding import com.sopt.umbba_android.domain.entity.User import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener class CommunicationActivity : BindingActivity(R.layout.activity_communication) { override fun onCreate(savedInstanceState: Bundle?) { @@ -17,7 +18,7 @@ class CommunicationActivity : BindingActivity(R.la } private fun goInputInfoActivity() { - binding.btnStart.setOnClickListener { + binding.btnStart.setOnSingleClickListener { val userData = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { intent.getParcelableExtra("userData", User::class.java) } else { diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt index 63b179c6..93605f0b 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt @@ -14,6 +14,7 @@ import com.sopt.umbba_android.domain.entity.User import com.sopt.umbba_android.presentation.onboarding.quest.QuestActivity import com.sopt.umbba_android.presentation.onboarding.viewmodel.InputInfoViewModel import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener import java.util.regex.Pattern class InputInfoActivity : BindingActivity(R.layout.activity_input_info), @@ -115,7 +116,7 @@ class InputInfoActivity : BindingActivity(R.layout.act } private fun goSelectFamilyActivity() { - binding.btnNext.setOnClickListener { + binding.btnNext.setOnSingleClickListener { val userData = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { intent.getParcelableExtra("userData", User::class.java) } else { diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt index 4df7db60..c3721800 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt @@ -10,15 +10,12 @@ import android.provider.Settings import android.util.Log import android.view.View import androidx.activity.result.contract.ActivityResultContracts -import androidx.activity.viewModels import androidx.core.content.ContextCompat import com.google.android.material.snackbar.Snackbar import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.ActivityNotifyTimeBinding -import com.sopt.umbba_android.domain.entity.User -import com.sopt.umbba_android.presentation.onboarding.quest.QuestViewModel -import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener class NotifyTimeActivity : BindingActivity(R.layout.activity_notify_time), @@ -88,7 +85,7 @@ class NotifyTimeActivity : private fun goOnboardingFinishActivity() { with(binding) { - btnGoPast.setOnClickListener { + btnGoPast.setOnSingleClickListener { startActivity(Intent(this@NotifyTimeActivity, OnboardingFinishActivity::class.java)) } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/OnboardingFinishActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/OnboardingFinishActivity.kt index 9998c4ea..17767970 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/OnboardingFinishActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/OnboardingFinishActivity.kt @@ -10,6 +10,7 @@ import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.ActivityOnboardingFinishBinding import com.sopt.umbba_android.presentation.MainActivity import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener class OnboardingFinishActivity : BindingActivity(R.layout.activity_onboarding_finish) { @@ -22,10 +23,10 @@ class OnboardingFinishActivity : } private fun goBack() { - binding.btnBack1.setOnClickListener { + binding.btnBack1.setOnSingleClickListener { finish() } - binding.btnBack2.setOnClickListener { + binding.btnBack2.setOnSingleClickListener { finish() } } @@ -48,7 +49,7 @@ class OnboardingFinishActivity : } private fun goMainActivity() { - binding.btnStart.setOnClickListener { + binding.btnStart.setOnSingleClickListener { startActivity( Intent( this, diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt index 8c6df4f9..7c17647f 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt @@ -12,6 +12,7 @@ import com.sopt.umbba_android.domain.entity.User import com.sopt.umbba_android.presentation.onboarding.quest.QuestActivity import com.sopt.umbba_android.presentation.onboarding.viewmodel.SelectFamilyViewModel import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener class SelectFamilyActivity : BindingActivity(R.layout.activity_select_family), @@ -85,7 +86,7 @@ class SelectFamilyActivity : } private fun goQuestActivity() { - binding.btnNext.setOnClickListener { + binding.btnNext.setOnSingleClickListener { val userData = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { intent.getParcelableExtra("userData", User::class.java) } else { diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt index 86d71959..79494765 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt @@ -22,6 +22,7 @@ import com.sopt.umbba_android.presentation.login.LoginActivity.Companion.DID_USE import com.sopt.umbba_android.presentation.onboarding.viewmodel.SetTimeViewModel import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener import com.sopt.umbba_android.util.setTimeInterval class SetTimeActivity : BindingActivity(R.layout.activity_set_time), @@ -116,7 +117,7 @@ class SetTimeActivity : BindingActivity(R.layout.activit } private fun goOnboardingFinishActivity() { - binding.btnNext.setOnClickListener { + binding.btnNext.setOnSingleClickListener { askNotificationPermission() val userData = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { intent.getParcelableExtra("userData", User::class.java) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt index 434643db..4d04e772 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt @@ -16,6 +16,7 @@ import com.sopt.umbba_android.presentation.onboarding.NotifyTimeActivity import com.sopt.umbba_android.presentation.onboarding.SetTimeActivity import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener class QuestActivity : BindingActivity(R.layout.activity_quest), View.OnClickListener { @@ -84,7 +85,7 @@ class QuestActivity : BindingActivity(R.layout.activity_qu } private fun clickNextButton() { - binding.btnNext.setOnClickListener { + binding.btnNext.setOnSingleClickListener { Log.d("viewmodel", "chipText : ${viewModel.clickedChipText.value.toString()}") Log.d("viewmodel", "count : ${count}") quest[count] = viewModel.clickedChipText.value.toString() diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/AnswerActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/AnswerActivity.kt index 4c883836..105e8415 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/AnswerActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/AnswerActivity.kt @@ -1,7 +1,6 @@ package com.sopt.umbba_android.presentation.qna import android.os.Bundle -import android.util.Log import android.view.View import androidx.activity.viewModels import com.sopt.umbba_android.R diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/BackAnswerDialogFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/BackAnswerDialogFragment.kt index aedebd30..7bd01d1e 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/BackAnswerDialogFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/BackAnswerDialogFragment.kt @@ -9,7 +9,7 @@ import android.view.ViewGroup import android.view.WindowManager import androidx.fragment.app.DialogFragment import com.sopt.umbba_android.databinding.FragmentBackAnswerDialogBinding -import com.sopt.umbba_android.databinding.FragmentConfirmAnswerDialogBinding +import com.sopt.umbba_android.util.setOnSingleClickListener class BackAnswerDialogFragment : DialogFragment() { @@ -40,10 +40,10 @@ class BackAnswerDialogFragment : DialogFragment() { private fun setBtnClickEvent() { with(binding) { - btnCancel.setOnClickListener { + btnCancel.setOnSingleClickListener { dismiss() } - btnConfirm.setOnClickListener { + btnConfirm.setOnSingleClickListener { dismiss() requireActivity().finish() } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/ConfirmAnswerDialogFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/ConfirmAnswerDialogFragment.kt index 52d63c41..799c9766 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/ConfirmAnswerDialogFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/ConfirmAnswerDialogFragment.kt @@ -3,13 +3,11 @@ package com.sopt.umbba_android.presentation.qna import android.graphics.Color import android.graphics.drawable.ColorDrawable import android.os.Bundle -import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.view.WindowManager import android.widget.Toast -import androidx.core.os.bundleOf import androidx.fragment.app.DialogFragment import androidx.fragment.app.viewModels import com.google.android.material.snackbar.Snackbar @@ -17,6 +15,7 @@ import com.sopt.umbba_android.data.model.request.AnswerRequestDto import com.sopt.umbba_android.databinding.FragmentConfirmAnswerDialogBinding import com.sopt.umbba_android.presentation.qna.viewmodel.ConfirmAnswerDialogFragmentViewModel import com.sopt.umbba_android.util.ViewModelFactory +import com.sopt.umbba_android.util.setOnSingleClickListener class ConfirmAnswerDialogFragment : DialogFragment() { @@ -60,10 +59,10 @@ class ConfirmAnswerDialogFragment : DialogFragment() { private fun setBtnClickEvent() { with(binding) { - btnBack.setOnClickListener { + btnBack.setOnSingleClickListener { dismiss() } - btnConfirm.setOnClickListener { + btnConfirm.setOnSingleClickListener { Snackbar.make(binding.root, "답변이 전송되었습니다.", Toast.LENGTH_SHORT).show() viewModel.postAnswer(AnswerRequestDto(arguments?.getString("answer"))) } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/NoOpponentDialogFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/NoOpponentDialogFragment.kt index f40f801b..dca58930 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/NoOpponentDialogFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/NoOpponentDialogFragment.kt @@ -9,6 +9,7 @@ import android.view.ViewGroup import android.view.WindowManager import androidx.fragment.app.DialogFragment import com.sopt.umbba_android.databinding.FragmentNoOpponentDialogBinding +import com.sopt.umbba_android.util.setOnSingleClickListener class NoOpponentDialogFragment : DialogFragment() { @@ -34,7 +35,7 @@ class NoOpponentDialogFragment : DialogFragment() { } private fun closeDialog() { - binding.btnClose.setOnClickListener { + binding.btnClose.setOnSingleClickListener { dismiss() } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt index 0506764f..08b2298e 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt @@ -3,7 +3,6 @@ package com.sopt.umbba_android.presentation.qna import android.content.Intent import android.graphics.BlurMaskFilter import android.os.Bundle -import android.util.Log import android.view.View import androidx.activity.viewModels import androidx.core.content.ContextCompat @@ -14,6 +13,7 @@ import com.sopt.umbba_android.databinding.ActivityQuestionAnswerBinding import com.sopt.umbba_android.presentation.qna.viewmodel.QuestionAnswerViewModel import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener import timber.log.Timber class QuestionAnswerActivity : @@ -49,7 +49,7 @@ class QuestionAnswerActivity : private fun setClickEvent(data: QuestionAnswerResponseDto.QnaData) { if (data.isMyAnswer == false) { - binding.btnAnswer.setOnClickListener { + binding.btnAnswer.setOnSingleClickListener { Intent(this@QuestionAnswerActivity, AnswerActivity::class.java).apply { putExtra("section", data.section) putExtra("topic", data.topic) @@ -119,7 +119,7 @@ class QuestionAnswerActivity : R.drawable.shape_pri500_btn_stroke_r50_rect ) btnAnswer.text = "홈으로" - btnAnswer.setOnClickListener { + btnAnswer.setOnSingleClickListener { finish() } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/setting/DeleteAccountActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/setting/DeleteAccountActivity.kt index 0733a9ed..3daa8d48 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/setting/DeleteAccountActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/setting/DeleteAccountActivity.kt @@ -1,16 +1,14 @@ package com.sopt.umbba_android.presentation.setting -import android.content.Intent import android.os.Bundle -import android.util.Log import android.view.View import androidx.activity.viewModels import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.ActivityDeleteAccountBinding -import com.sopt.umbba_android.presentation.login.LoginActivity import com.sopt.umbba_android.presentation.setting.viewmodel.DeleteAccountViewModel import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener class DeleteAccountActivity : BindingActivity(R.layout.activity_delete_account), @@ -24,7 +22,7 @@ class DeleteAccountActivity : private fun setClickEvent() { with(binding) { - btnDeleteAccount.setOnClickListener { + btnDeleteAccount.setOnSingleClickListener { DeleteAccountDialogFragment().apply{ show(supportFragmentManager, "DeleteAccountDialog") } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/setting/DeleteAccountDialogFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/setting/DeleteAccountDialogFragment.kt index 951a018e..71f4a8f6 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/setting/DeleteAccountDialogFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/setting/DeleteAccountDialogFragment.kt @@ -4,21 +4,18 @@ import android.content.Intent import android.graphics.Color import android.graphics.drawable.ColorDrawable import android.os.Bundle -import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.view.WindowManager -import androidx.activity.viewModels import androidx.fragment.app.DialogFragment import androidx.fragment.app.viewModels import com.sopt.umbba_android.data.local.SharedPreferences import com.sopt.umbba_android.databinding.FragemntDeleteAccountDialogBinding import com.sopt.umbba_android.presentation.login.LoginActivity import com.sopt.umbba_android.presentation.setting.viewmodel.DeleteAccountViewModel -import com.sopt.umbba_android.presentation.setting.viewmodel.ManageAccountViewModel import com.sopt.umbba_android.util.ViewModelFactory - +import com.sopt.umbba_android.util.setOnSingleClickListener class DeleteAccountDialogFragment : DialogFragment() { @@ -47,10 +44,10 @@ class DeleteAccountDialogFragment : DialogFragment() { private fun setBtnClickEvent() { with(binding) { - btnCancel.setOnClickListener { + btnCancel.setOnSingleClickListener { dismiss() } - btnConfirm.setOnClickListener { + btnConfirm.setOnSingleClickListener { viewModel.signout() } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/setting/ManageAccountActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/setting/ManageAccountActivity.kt index ba7e5edd..9b05522e 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/setting/ManageAccountActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/setting/ManageAccountActivity.kt @@ -2,9 +2,7 @@ package com.sopt.umbba_android.presentation.setting import android.content.Intent import android.os.Bundle -import android.util.Log import android.view.View -import android.widget.Toast import androidx.activity.viewModels import com.sopt.umbba_android.R import com.sopt.umbba_android.data.local.SharedPreferences @@ -13,6 +11,7 @@ import com.sopt.umbba_android.presentation.login.LoginActivity import com.sopt.umbba_android.presentation.setting.viewmodel.ManageAccountViewModel import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingActivity +import com.sopt.umbba_android.util.setOnSingleClickListener class ManageAccountActivity : BindingActivity(R.layout.activity_manage_account), @@ -44,10 +43,10 @@ class ManageAccountActivity : private fun setClickEvent() { with(binding) { - clLogout.setOnClickListener { + clLogout.setOnSingleClickListener { viewModel.logout() } - clDeleteAccount.setOnClickListener { + clDeleteAccount.setOnSingleClickListener { startActivity(Intent(this@ManageAccountActivity, DeleteAccountActivity::class.java)) } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt index 1661fd1a..01119955 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt @@ -17,6 +17,7 @@ import com.sopt.umbba_android.databinding.FragmentSettingBinding import com.sopt.umbba_android.presentation.onboarding.OnboardingFinishActivity import com.sopt.umbba_android.util.binding.BindingFragment import com.sopt.umbba_android.util.fcm.MyFirebaseMessagingService +import com.sopt.umbba_android.util.setOnSingleClickListener import timber.log.Timber class SettingFragment : BindingFragment(R.layout.fragment_setting) { @@ -58,10 +59,10 @@ class SettingFragment : BindingFragment(R.layout.fragmen private fun setClickEvent() { with(binding) { - clManageAccount.setOnClickListener { + clManageAccount.setOnSingleClickListener { startActivity(Intent(requireActivity(), ManageAccountActivity::class.java)) } - clAboutUmbba.setOnClickListener { + clAboutUmbba.setOnSingleClickListener { startActivity( Intent( Intent.ACTION_VIEW, @@ -69,7 +70,7 @@ class SettingFragment : BindingFragment(R.layout.fragmen ) ) } - clTos.setOnClickListener { + clTos.setOnSingleClickListener { startActivity( Intent( Intent.ACTION_VIEW, @@ -77,7 +78,7 @@ class SettingFragment : BindingFragment(R.layout.fragmen ) ) } - clPrivacyNotice.setOnClickListener { + clPrivacyNotice.setOnSingleClickListener { startActivity( Intent( Intent.ACTION_VIEW, diff --git a/app/src/main/java/com/sopt/umbba_android/util/ViewExtension.kt b/app/src/main/java/com/sopt/umbba_android/util/ViewExtension.kt new file mode 100644 index 00000000..e611da14 --- /dev/null +++ b/app/src/main/java/com/sopt/umbba_android/util/ViewExtension.kt @@ -0,0 +1,17 @@ +package com.sopt.umbba_android.util + +import android.view.View + +inline fun View.setOnSingleClickListener( + delay: Long = 500L, + crossinline block: (View) -> Unit +) { + var previousClickedTime = 0L + setOnClickListener { view -> + val clickedTime = System.currentTimeMillis() + if (clickedTime - previousClickedTime >= delay) { + block(view) + previousClickedTime = clickedTime + } + } +} \ No newline at end of file From 0b8a8f97978a9f3ddabcdd3b364dfc52c37d09bf Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 17:48:02 +0900 Subject: [PATCH 05/14] =?UTF-8?q?[Chore/#98]=20=EB=85=B8=EC=85=98=20?= =?UTF-8?q?=EC=A3=BC=EC=86=8C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/login/AgreePrivacyUseActivity.kt | 4 ++-- app/src/main/res/values/strings.xml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt index 67a60a8a..6b061d8a 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt @@ -84,7 +84,7 @@ class AgreePrivacyUseActivity : BindingActivity( private fun setHyperLinkAndColorInTermsTextView() { with(binding) { - setHyperLinkToTextView("서비스 이용약관", tvAgreeTermsAndCondition, "https://www.notion.so/f1a14bf60ed4421f9b3761ef88906adb?pvs=4") + setHyperLinkToTextView("서비스 이용약관", tvAgreeTermsAndCondition, "https://harsh-step-7dd.notion.site/f1a14bf60ed4421f9b3761ef88906adb") setLinkTextColorToBlack(tvAgreeTermsAndCondition) setLinkBold(tvAgreeTermsAndCondition, 13) } @@ -92,7 +92,7 @@ class AgreePrivacyUseActivity : BindingActivity( private fun setHyperLinkAndColorInPrivacyTextView() { with(binding) { - setHyperLinkToTextView("개인정보 수집 및 이용", tvAgreePrivacy, "https://www.notion.so/99fe0f58825d4f87bd3b987fadc623b6?pvs=4") + setHyperLinkToTextView("개인정보 수집 및 이용", tvAgreePrivacy, "https://harsh-step-7dd.notion.site/99fe0f58825d4f87bd3b987fadc623b6?pvs=4") setLinkTextColorToBlack(tvAgreePrivacy) setLinkBold(tvAgreePrivacy, 17) } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c0fbd8b0..669e01b7 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -155,9 +155,13 @@ 학창시절 청춘시절 연애시절 + + *형식이 올바르지 않습니다. *7글자 이하로 작성해주세요. *4글자로 작성해주세요. + + https://brawny-guan-098.notion.site/7b3e5f70a471468f8acbe56a1a4f4ec9 https://harsh-step-7dd.notion.site/f1a14bf60ed4421f9b3761ef88906adb https://harsh-step-7dd.notion.site/99fe0f58825d4f87bd3b987fadc623b6?pvs=4 From eb7a993b7bc5aad4cac1d906b62a2b280f0e3dae Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 17:48:42 +0900 Subject: [PATCH 06/14] =?UTF-8?q?[Chore/#98]=20=EC=9D=B4=EB=A6=84=20?= =?UTF-8?q?=EB=B0=8F=20=ED=8F=B4=EB=8D=94=EB=A7=81=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasicAppbarFragment.kt => util/BasicAppbar.kt} | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) rename app/src/main/java/com/sopt/umbba_android/{presentation/BasicAppbarFragment.kt => util/BasicAppbar.kt} (58%) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/BasicAppbarFragment.kt b/app/src/main/java/com/sopt/umbba_android/util/BasicAppbar.kt similarity index 58% rename from app/src/main/java/com/sopt/umbba_android/presentation/BasicAppbarFragment.kt rename to app/src/main/java/com/sopt/umbba_android/util/BasicAppbar.kt index aed1cc9c..1f65cbd4 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/BasicAppbarFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/util/BasicAppbar.kt @@ -1,15 +1,12 @@ -package com.sopt.umbba_android.presentation +package com.sopt.umbba_android.util -import android.content.Context import android.os.Bundle -import android.util.AttributeSet import android.view.View -import android.view.View.OnClickListener import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.BasicAppbarBinding import com.sopt.umbba_android.util.binding.BindingFragment -class BasicAppbarFragment : BindingFragment(R.layout.basic_appbar) { +class BasicAppbar : BindingFragment(R.layout.basic_appbar) { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) } From 10ebdda12721601ab6448d2931b026a3ccedf91b Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 19:07:23 +0900 Subject: [PATCH 07/14] =?UTF-8?q?[Chore/#98]=20String=20=EC=B6=94=EC=B6=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/InviteCodeDialogFragment.kt | 5 +- .../presentation/invite/InviteCodeActivity.kt | 2 +- .../login/AgreePrivacyUseActivity.kt | 8 +-- .../onboarding/NotifyTimeActivity.kt | 22 +++---- .../onboarding/SetTimeActivity.kt | 6 +- .../onboarding/quest/QuestActivity.kt | 6 +- .../qna/ConfirmAnswerDialogFragment.kt | 3 +- .../qna/QuestionAnswerActivity.kt | 4 +- .../presentation/setting/SettingFragment.kt | 2 +- app/src/main/res/values/strings.xml | 60 +++++++++++-------- 10 files changed, 65 insertions(+), 53 deletions(-) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt index 04bc8883..cfba7c55 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt @@ -19,6 +19,7 @@ import com.kakao.sdk.template.model.Button import com.kakao.sdk.template.model.Content import com.kakao.sdk.template.model.FeedTemplate import com.kakao.sdk.template.model.Link +import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.FragmentInviteCodeDialogBinding import com.sopt.umbba_android.util.setOnSingleClickListener @@ -64,7 +65,7 @@ class InviteCodeDialogFragment(private val inviteUserName: String, private val i requireActivity().getSystemService(CLIPBOARD_SERVICE) as ClipboardManager val clip = ClipData.newPlainText("label", binding.tvInviteCode.text) clipboard.setPrimaryClip(clip) - Toast.makeText(requireActivity(), "초대 코드가 복사되었습니다", Toast.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.copy_invite_code_snackbar, Toast.LENGTH_SHORT).show() } } @@ -104,7 +105,7 @@ class InviteCodeDialogFragment(private val inviteUserName: String, private val i } } } else { - Snackbar.make(binding.root, "카카오톡을 설치해주세요.", Snackbar.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.install_kakaotalk, Snackbar.LENGTH_SHORT).show() } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt index 16d99d83..0478c1a9 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt @@ -83,7 +83,7 @@ class InviteCodeActivity : setInviteCodeBoolean(DID_USER_CLEAR_INVITE_CODE, true) goCommunicationActivity() } else { - Snackbar.make(binding.root, "유효하지 않은 초대코드 입니다.", Snackbar.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.invalid_invite_code, Snackbar.LENGTH_SHORT).show() } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt index 6b061d8a..a3bd0047 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt @@ -84,7 +84,7 @@ class AgreePrivacyUseActivity : BindingActivity( private fun setHyperLinkAndColorInTermsTextView() { with(binding) { - setHyperLinkToTextView("서비스 이용약관", tvAgreeTermsAndCondition, "https://harsh-step-7dd.notion.site/f1a14bf60ed4421f9b3761ef88906adb") + setHyperLinkToTextView(R.string.terms_and_condition, tvAgreeTermsAndCondition, "https://harsh-step-7dd.notion.site/f1a14bf60ed4421f9b3761ef88906adb") setLinkTextColorToBlack(tvAgreeTermsAndCondition) setLinkBold(tvAgreeTermsAndCondition, 13) } @@ -92,15 +92,15 @@ class AgreePrivacyUseActivity : BindingActivity( private fun setHyperLinkAndColorInPrivacyTextView() { with(binding) { - setHyperLinkToTextView("개인정보 수집 및 이용", tvAgreePrivacy, "https://harsh-step-7dd.notion.site/99fe0f58825d4f87bd3b987fadc623b6?pvs=4") + setHyperLinkToTextView(R.string.privacy, tvAgreePrivacy, "https://harsh-step-7dd.notion.site/99fe0f58825d4f87bd3b987fadc623b6?pvs=4") setLinkTextColorToBlack(tvAgreePrivacy) setLinkBold(tvAgreePrivacy, 17) } } - private fun setHyperLinkToTextView(text: String, view: TextView, uri: String) { + private fun setHyperLinkToTextView(text: Int, view: TextView, uri: String) { val transform = Linkify.TransformFilter { match, url -> "" } - val pattern = Pattern.compile(text) + val pattern = Pattern.compile(text.toString()) Linkify.addLinks(view, pattern, uri, null, transform) } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt index c3721800..43e0834c 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt @@ -24,10 +24,10 @@ class NotifyTimeActivity : private val requestPermissionLauncher = registerForActivityResult(ActivityResultContracts.RequestPermission()) { isGranted: Boolean -> if (isGranted) { // 알림권한 허용 o - Snackbar.make(binding.root, "알림 권한이 허용되었습니다.", Snackbar.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.allow_notification, Snackbar.LENGTH_SHORT).show() } else { // 알림권한 허용 x - Snackbar.make(binding.root, "알림 권한이 없습니다.", Snackbar.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.not_allow_notification, Snackbar.LENGTH_SHORT).show() } } @@ -53,27 +53,27 @@ class NotifyTimeActivity : val minute = time.substring(3, 5) var hourText = "" when (hour) { - 1, 2, 3, 4, 5 -> hourText = "새벽" - 6, 7, 8, 9, 10, 11 -> hourText = "아침" - 12, 13, 14, 15, 16, 17 -> hourText = "낮" - 18, 19, 20 -> hourText = "저녁" - 21, 22, 23, 24 -> hourText = "밤" + 1, 2, 3, 4, 5 -> hourText = getString(R.string.dawn) + 6, 7, 8, 9, 10, 11 -> hourText = getString(R.string.morning) + 12, 13, 14, 15, 16, 17 -> hourText = getString(R.string.day) + 18, 19, 20 -> hourText = getString(R.string.evening) + 21, 22, 23, 24 -> hourText = getString(R.string.night) } if (hour >= 13) { hour %= 12 } if (minute == "00") { - binding.tvTitle.text = "매일 ${hourText} ${hour}시에\n교신을 보내줄게" + binding.tvTitle.text = getString(R.string.everyday_notification, hourText, hour) } else { - binding.tvTitle.text = "매일 ${hourText} ${hour}시 반에\n교신을 보내줄게" + binding.tvTitle.text = getString(R.string.everyday_notification_half, hourText, hour) } } private fun askNotificationPermission() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { if (ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED) { - Snackbar.make(binding.root, "알림 권한이 허용되어 있습니다.", Snackbar.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.allowing_notification, Snackbar.LENGTH_SHORT).show() } else if (shouldShowRequestPermissionRationale(Manifest.permission.POST_NOTIFICATIONS)) { // 왜 알림을 허용해야 하는지에 대한 설명 + 권한 거절 시 권한 설정 화면으로 이동 - Snackbar.make(binding.root, "알림 권한을 설정하면 답변 작성 요청 알림을 받아볼 수 있습니다.", Snackbar.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.if_allow_notification, Snackbar.LENGTH_SHORT).show() val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).setData(Uri.parse("package:"+ this.packageName)) startActivity(intent) this.finish() diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt index 79494765..6e4ec914 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt @@ -74,12 +74,12 @@ class SetTimeActivity : BindingActivity(R.layout.activit Manifest.permission.POST_NOTIFICATIONS ) == PackageManager.PERMISSION_GRANTED ) { - Snackbar.make(binding.root, "알림 권한이 허용되어 있습니다.", Snackbar.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.allowing_notification, Snackbar.LENGTH_SHORT).show() } else if (shouldShowRequestPermissionRationale(Manifest.permission.POST_NOTIFICATIONS)) { // 왜 알림을 허용해야 하는지에 대한 설명 + 권한 거절 시 권한 설정 화면으로 이동 Snackbar.make( binding.root, - "알림 권한을 설정하면 답변 작성 요청 알림을 받아볼 수 있습니다.", + R.string.if_allow_notification, Snackbar.LENGTH_SHORT ).show() val intent = @@ -136,7 +136,7 @@ class SetTimeActivity : BindingActivity(R.layout.activit setOnboardingBoolean(DID_USER_CLEAR_INVITE_CODE, true) startActivity(Intent(this, OnboardingFinishActivity::class.java)) } else { - Snackbar.make(binding.root, "정보 등록에 실패했습니다.", Snackbar.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.fail_information_post, Snackbar.LENGTH_SHORT).show() } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt index 4d04e772..65033733 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt @@ -57,9 +57,9 @@ class QuestActivity : BindingActivity(R.layout.activity_qu private fun setBeforeButtonClick(count: Int) { when (quest[count].toString()) { - "응" -> viewModel.isClickedYes.value = true - "아니" -> viewModel.isClickedNo.value = true - "애매해" -> viewModel.isClickedAmbiguous.value = true + getString(R.string.yes) -> viewModel.isClickedYes.value = true + getString(R.string.no) -> viewModel.isClickedNo.value = true + getString(R.string.ambiguous) -> viewModel.isClickedAmbiguous.value = true } Log.d("viewmodel", "pop stack : ${count}번 : ${quest[count].toString()}") } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/ConfirmAnswerDialogFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/ConfirmAnswerDialogFragment.kt index 799c9766..96c0682b 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/ConfirmAnswerDialogFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/ConfirmAnswerDialogFragment.kt @@ -11,6 +11,7 @@ import android.widget.Toast import androidx.fragment.app.DialogFragment import androidx.fragment.app.viewModels import com.google.android.material.snackbar.Snackbar +import com.sopt.umbba_android.R import com.sopt.umbba_android.data.model.request.AnswerRequestDto import com.sopt.umbba_android.databinding.FragmentConfirmAnswerDialogBinding import com.sopt.umbba_android.presentation.qna.viewmodel.ConfirmAnswerDialogFragmentViewModel @@ -63,7 +64,7 @@ class ConfirmAnswerDialogFragment : DialogFragment() { dismiss() } btnConfirm.setOnSingleClickListener { - Snackbar.make(binding.root, "답변이 전송되었습니다.", Toast.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.post_answer, Toast.LENGTH_SHORT).show() viewModel.postAnswer(AnswerRequestDto(arguments?.getString("answer"))) } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt index 08b2298e..cc6bef1e 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt @@ -35,7 +35,7 @@ class QuestionAnswerActivity : private fun observeQnaViewFlag() { val qnaId = intent.getLongExtra("questionId", -1) - Timber.e( "qnaId activity에서" + qnaId.toString()) + Timber.e("qnaId activity에서 $qnaId") if (qnaId == -1L) { viewModel.getQuestionAnswer() viewModel.isBeforeList.value = false @@ -118,7 +118,7 @@ class QuestionAnswerActivity : this@QuestionAnswerActivity, R.drawable.shape_pri500_btn_stroke_r50_rect ) - btnAnswer.text = "홈으로" + btnAnswer.text = getString(R.string.home) btnAnswer.setOnSingleClickListener { finish() } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt index 01119955..9e4a2777 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt @@ -83,7 +83,7 @@ class SettingFragment : BindingFragment(R.layout.fragmen Intent( Intent.ACTION_VIEW, Uri.parse(getString(R.string.notion_privacy_notice)) - ) //공지사항 바꾸기 + ) ) } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 669e01b7..3b47e072 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -6,6 +6,7 @@ ex) ORWO-11yzwx 초대코드를 입력해줘 + 유효하지 않은 초대코드 입니다. 엄빠도 어렸다 @@ -27,6 +28,9 @@ ex) 홍길동 태어난 연도는 언제야? ex) 1988 + *형식이 올바르지 않습니다. + *7글자 이하로 작성해주세요. + *4글자로 작성해주세요. *올바른 초대코드 형식이 아닙니다. @@ -45,12 +49,24 @@ 매일 밤\n교신을 보내줄게 선택한 시간에 따라 푸시 알림을 보내드려요 + 정보 등록에 실패했습니다. 오늘부터 매일, 과거로 시간 여행을 떠날 거야 초대자가 선택한 시간에 따라 푸시 알림을 보내드려요 과거로 떠나기 매일 밤 11시에\n교신을 보내줄게 + 알림 권한이 허용되었습니다. + 알림 권한이 없습니다. + 알림 권한이 허용되어 있습니다. + 알림 권한을 설정하면 답변 작성 요청 알림을 받아볼 수 있습니다. + 새벽 + 아침 + + 저녁 + + 매일 %1s %2d시에\n교신을 보내줄게 + 매일 %1s %2d시 반에\n교신을 보내줄게 거의 다 왔어! 조금만 힘내줘! @@ -63,6 +79,9 @@ About 엄빠도 어렸다 이용약관 개인정보 처리방침 + https://brawny-guan-098.notion.site/7b3e5f70a471468f8acbe56a1a4f4ec9 + https://harsh-step-7dd.notion.site/f1a14bf60ed4421f9b3761ef88906adb + https://harsh-step-7dd.notion.site/99fe0f58825d4f87bd3b987fadc623b6?pvs=4 답변을 입력해 주세요 @@ -79,20 +98,29 @@ 질문 확인하기 하단 버튼을 눌러 답변을 입력하세요 상대방은 아직 답변하지 않았어요 + 홈으로 상대를 초대할 차례야\n상대방이 수락하면 문답이 시작돼 초대코드 복사 카카오톡으로 초대 보내기 + 초대 코드가 복사되었습니다. + 카카오톡을 설치해주세요. 답변을 저장하시겠어요? 돌아가기 저장 + 답변이 전송되었습니다. 리스트 #%d + # 어린시절 + # 학창시절 + # 청춘시절 + # 연애시절 + # 우리가 만나고 답변 작성을 취소하시겠어요?\n작성 중인 답변은 저장되지 않아요 @@ -125,13 +153,19 @@ [필수] 서비스 이용약관에 동의합니다. [필수] 개인정보 수집 및 이용에 동의합니다. \'(주)이승준 컴퍼니\'(이하 \'회사\')가 운영하는 \'엄빠도 어렸다\'는 개인정보보호법 제30조 의거 이용자의 개인정보보호와 권익을 보호하고 관련된 고충 및 애로사항을 신속하게 처리하기 위해 아래의 개인정보처리방침을 제정·운영하고 있습니다. - + 서비스 이용약관 + 개인정보 수집 및 이용 + 전화 받기 오래된 공중전화에서 수신음이 들린다 #%d %s + 어린시절 + 학창시절 + 청춘시절 + 연애시절 @@ -143,28 +177,4 @@ 뭔가를 크게 포기해본 경험이 있어? 돌아가고 싶은 순간이 있어? - - # 어린시절 - # 학창시절 - # 청춘시절 - # 연애시절 - # 우리가 만나고 - - - 어린시절 - 학창시절 - 청춘시절 - 연애시절 - - - *형식이 올바르지 않습니다. - *7글자 이하로 작성해주세요. - *4글자로 작성해주세요. - - - https://brawny-guan-098.notion.site/7b3e5f70a471468f8acbe56a1a4f4ec9 - https://harsh-step-7dd.notion.site/f1a14bf60ed4421f9b3761ef88906adb - https://harsh-step-7dd.notion.site/99fe0f58825d4f87bd3b987fadc623b6?pvs=4 - - \ No newline at end of file From 86db81878f2ae44386ea04b78f34e12ef58537a5 Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 19:45:43 +0900 Subject: [PATCH 08/14] =?UTF-8?q?[Delete/#98]=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EC=9D=80=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/model/response/wrapper/BaseResponse.kt | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 app/src/main/java/com/sopt/umbba_android/data/model/response/wrapper/BaseResponse.kt diff --git a/app/src/main/java/com/sopt/umbba_android/data/model/response/wrapper/BaseResponse.kt b/app/src/main/java/com/sopt/umbba_android/data/model/response/wrapper/BaseResponse.kt deleted file mode 100644 index 3fe62f4e..00000000 --- a/app/src/main/java/com/sopt/umbba_android/data/model/response/wrapper/BaseResponse.kt +++ /dev/null @@ -1,10 +0,0 @@ -package com.sopt.umbba_android.data.model.response.wrapper - -import kotlinx.serialization.Serializable - -@Serializable -data class BaseResponse( - val status: Int, - val message: String, - val data: T? -) From 3475bd1a6706e61721f91a90c2373df238477f3e Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 19:54:40 +0900 Subject: [PATCH 09/14] =?UTF-8?q?[Design/#98]=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EA=B7=B8=EB=A6=BC=EC=9E=90=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/layout/activity_delete_account.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/res/layout/activity_delete_account.xml b/app/src/main/res/layout/activity_delete_account.xml index c2862b42..fc68509a 100644 --- a/app/src/main/res/layout/activity_delete_account.xml +++ b/app/src/main/res/layout/activity_delete_account.xml @@ -95,6 +95,7 @@ android:text="@string/btn_delete_account" android:textAppearance="@style/AndroidBody1_1SemiBold16" android:textColor="@color/umbba_white" + android:stateListAnimator="@null" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" /> From e80e00f9ebd9a5815d0b1e52f13c21a2fa810490 Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 19:56:47 +0900 Subject: [PATCH 10/14] =?UTF-8?q?[Chore/#98]=20=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20=EB=B0=8F=20=EB=A1=9C=EA=B7=B8=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD,=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/interceptor/AuthInterceptor.kt | 5 +--- .../data/local/SharedPreferences.kt | 7 ++--- .../data/repository/HomeRepositoryImpl.kt | 4 +-- .../data/repository/ListRepositoryImpl.kt | 4 +-- .../data/repository/LoginRepositoryImpl.kt | 4 +-- .../repository/OnboardingRepositoryImpl.kt | 13 +++++---- .../QuestionAnswerRepositoryImpl.kt | 12 ++++---- .../data/repository/SettingRepositoryImpl.kt | 9 +++--- .../home/InviteCodeDialogFragment.kt | 21 +++++++------- .../home/viewmodel/HomeViewModel.kt | 4 +-- .../presentation/invite/InviteActivity.kt | 5 +--- .../presentation/invite/InviteCodeActivity.kt | 3 -- .../invite/viewmodel/InviteCodeViewModel.kt | 9 ++---- .../presentation/list/ListQuestionAdapter.kt | 2 +- .../list/viewmodel/ListViewModel.kt | 3 +- .../presentation/login/LoginActivity.kt | 28 +++++-------------- .../login/viewmodel/LoginViewModel.kt | 6 ++-- .../onboarding/CommunicationActivity.kt | 1 - .../onboarding/InputInfoActivity.kt | 12 ++------ .../onboarding/NotifyTimeActivity.kt | 3 -- .../onboarding/SelectFamilyActivity.kt | 1 - .../onboarding/SetTimeActivity.kt | 9 ++---- .../onboarding/quest/QuestActivity.kt | 8 ------ .../onboarding/quest/QuestViewModel.kt | 11 +++----- .../onboarding/viewmodel/SetTimeViewModel.kt | 5 ++-- .../qna/QuestionAnswerActivity.kt | 2 +- .../qna/viewmodel/AnswerViewModel.kt | 2 -- .../ConfirmAnswerDialogFragmentViewModel.kt | 4 +-- .../qna/viewmodel/QuestionAnswerViewModel.kt | 6 ++-- .../presentation/setting/SettingFragment.kt | 1 - .../viewmodel/DeleteAccountViewModel.kt | 4 +-- .../viewmodel/ManageAccountViewModel.kt | 4 +-- app/src/main/res/values/strings.xml | 9 ++++-- 33 files changed, 86 insertions(+), 135 deletions(-) diff --git a/app/src/main/java/com/sopt/umbba_android/data/interceptor/AuthInterceptor.kt b/app/src/main/java/com/sopt/umbba_android/data/interceptor/AuthInterceptor.kt index 35cb9262..4adf1bba 100644 --- a/app/src/main/java/com/sopt/umbba_android/data/interceptor/AuthInterceptor.kt +++ b/app/src/main/java/com/sopt/umbba_android/data/interceptor/AuthInterceptor.kt @@ -13,21 +13,18 @@ class AuthInterceptor : Interceptor { val token = if (SharedPreferences.getString(USER_TOKEN).isNullOrBlank()) { SharedPreferences.getKakaoString(USER_KAKAO_TOKEN) - // 저장된 서버 액세스 토큰이 없다면 카카오 토큰 전송 -> 회원가입 } else { "Bearer ${SharedPreferences.getString(USER_TOKEN)}" - // 저장된 서버 액세스 토큰이 있다면 Bearer 붙여서 전송 -> 로그인 } val originalRequest = chain.request() - val headerRequest = originalRequest.newBuilder() // 헤더를 추가한 req + val headerRequest = originalRequest.newBuilder() .header( "Authorization", "$token" ) .build() - Log.e("yeonjin", "헤더 $token") return chain.proceed(headerRequest) } } \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/data/local/SharedPreferences.kt b/app/src/main/java/com/sopt/umbba_android/data/local/SharedPreferences.kt index de341621..1ff64006 100644 --- a/app/src/main/java/com/sopt/umbba_android/data/local/SharedPreferences.kt +++ b/app/src/main/java/com/sopt/umbba_android/data/local/SharedPreferences.kt @@ -38,19 +38,18 @@ object SharedPreferences { return preferences.getString(key, null) } - //토큰 저장 fun setString(key: String, value: String?) { preferences.edit { putString(key, value) } } - //토큰 가져오기 - 자동 로그인 확인 + fun getString(key: String): String? { return preferences.getString(key, null) } - //온보딩 완료 상태 저장 + fun setOnboardingBoolean(key: String, value: Boolean) { preferences.edit { putBoolean(key, value) } } - //온보딩 완료했는지 가져오기 - 온보딩 완료 확인 + fun getOnboardingBoolean(key: String): Boolean { return preferences.getBoolean(key, false) } diff --git a/app/src/main/java/com/sopt/umbba_android/data/repository/HomeRepositoryImpl.kt b/app/src/main/java/com/sopt/umbba_android/data/repository/HomeRepositoryImpl.kt index 3604193c..b46a457d 100644 --- a/app/src/main/java/com/sopt/umbba_android/data/repository/HomeRepositoryImpl.kt +++ b/app/src/main/java/com/sopt/umbba_android/data/repository/HomeRepositoryImpl.kt @@ -11,7 +11,7 @@ class HomeRepositoryImpl(private val homeRemoteDataSource: HomeRemoteDataSource) runCatching { homeRemoteDataSource.getHomeData() }.onSuccess { - Timber.e("get home data 성공~") + Timber.d("get home data 성공") }.onFailure { Timber.e("get home data 실패") } @@ -20,7 +20,7 @@ class HomeRepositoryImpl(private val homeRemoteDataSource: HomeRemoteDataSource) runCatching { homeRemoteDataSource.getResponseCase() }.onSuccess { - Timber.e("get response case 성공~") + Timber.d("get response case 성공") }.onFailure { Timber.e("get response case 실패") } diff --git a/app/src/main/java/com/sopt/umbba_android/data/repository/ListRepositoryImpl.kt b/app/src/main/java/com/sopt/umbba_android/data/repository/ListRepositoryImpl.kt index d9496281..8bb7c14c 100644 --- a/app/src/main/java/com/sopt/umbba_android/data/repository/ListRepositoryImpl.kt +++ b/app/src/main/java/com/sopt/umbba_android/data/repository/ListRepositoryImpl.kt @@ -10,8 +10,8 @@ class ListRepositoryImpl(private val listRemoteDataSource: ListRemoteDataSource) runCatching { listRemoteDataSource.getListData(sectionId) }.onSuccess { - Timber.e("get list data 성공~") + Timber.d("get list data 성공") }.onFailure { - Timber.e("get list data 실패 크라잉 . . . ") + Timber.e("get list data 실패") } } \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/data/repository/LoginRepositoryImpl.kt b/app/src/main/java/com/sopt/umbba_android/data/repository/LoginRepositoryImpl.kt index 78141b0d..23854004 100644 --- a/app/src/main/java/com/sopt/umbba_android/data/repository/LoginRepositoryImpl.kt +++ b/app/src/main/java/com/sopt/umbba_android/data/repository/LoginRepositoryImpl.kt @@ -14,8 +14,8 @@ class LoginRepositoryImpl( runCatching { loginRemoteDataSource.postLogin(loginRequestDto) }.onSuccess { - Log.e("yeonjin", "Impl login 성공") + Timber.d("Impl login 성공") }.onFailure { - Log.e("yeonjin", "Impl login 실패") + Timber.e("Impl login 실패") } } \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/data/repository/OnboardingRepositoryImpl.kt b/app/src/main/java/com/sopt/umbba_android/data/repository/OnboardingRepositoryImpl.kt index bf2a6eb6..1f66549d 100644 --- a/app/src/main/java/com/sopt/umbba_android/data/repository/OnboardingRepositoryImpl.kt +++ b/app/src/main/java/com/sopt/umbba_android/data/repository/OnboardingRepositoryImpl.kt @@ -9,6 +9,7 @@ import com.sopt.umbba_android.data.model.response.InviteCodeResponseDto import com.sopt.umbba_android.data.model.response.ReceiveInfoResponseDto import com.sopt.umbba_android.data.model.response.SendInfoResponseDto import com.sopt.umbba_android.domain.repository.OnboardingRepository +import timber.log.Timber class OnboardingRepositoryImpl( private val onboardingRemoteDataSource: OnboardingRemoteDataSource @@ -17,26 +18,26 @@ class OnboardingRepositoryImpl( runCatching { onboardingRemoteDataSource.setFamily(inviteCodeRequestDto) }.onSuccess { - Log.e("yeonjin", "onboarding setFamily Impl 성공") + Timber.d("onboarding setFamily Impl 성공") }.onFailure { - Log.e("yeonjin", "onboarding setFamily Impl 실패") + Timber.e("onboarding setFamily Impl 실패") } override suspend fun setSendInfo(sendInfoRequestDto: SendInfoRequestDto): Result = runCatching { onboardingRemoteDataSource.setSendInfo(sendInfoRequestDto) }.onSuccess { - Log.e("yeonjin", "onboarding setSendInfo Impl 성공") + Timber.d("onboarding setSendInfo Impl 성공") }.onFailure { - Log.e("yeonjin", "onboarding setSendInfo Impl 성공") + Timber.e("onboarding setSendInfo Impl 성공") } override suspend fun setReceiveInfo(receiveInfoRequestDto: ReceiveInfoRequestDto): Result = runCatching { onboardingRemoteDataSource.setReceiveInfo(receiveInfoRequestDto) }.onSuccess { - Log.e("yeonjin", "onboarding setReceiveInfo Impl 성공") + Timber.d("onboarding setReceiveInfo Impl 성공") }.onFailure { - Log.e("yeonjin", "onboarding setReceiveInfo Impl 성공") + Timber.e("onboarding setReceiveInfo Impl 성공") } } \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/data/repository/QuestionAnswerRepositoryImpl.kt b/app/src/main/java/com/sopt/umbba_android/data/repository/QuestionAnswerRepositoryImpl.kt index f023fe38..b63cc336 100644 --- a/app/src/main/java/com/sopt/umbba_android/data/repository/QuestionAnswerRepositoryImpl.kt +++ b/app/src/main/java/com/sopt/umbba_android/data/repository/QuestionAnswerRepositoryImpl.kt @@ -14,26 +14,26 @@ class QuestionAnswerRepositoryImpl(private val questionAnswerRemoteDataSource: Q runCatching { questionAnswerRemoteDataSource.getQuestionAnswer() }.onSuccess { - Timber.e("문답 data get 성공") + Timber.d("문답 data get 성공") }.onFailure { - Timber.e("문답 data get 실패 크라잉. . . ") + Timber.e("문답 data get 실패") } override suspend fun getListQuestionAnswer(qnaId: Long): Result = runCatching { questionAnswerRemoteDataSource.getListQuestionAnswer(qnaId) }.onSuccess { - Timber.e("list qna data get 성공") + Timber.d("list qna data get 성공") }.onFailure { - Timber.e("list qna data get 시이일패") + Timber.e("list qna data get 실패") } override suspend fun postAnswer(answerRequestDto: AnswerRequestDto):Result = runCatching { questionAnswerRemoteDataSource.postAnswer(answerRequestDto) }.onSuccess { - Timber.e("답변 data post 성공") + Timber.d("답변 data post 성공") }.onFailure { - Timber.e("답변 data post 실패 크라잉. . . ") + Timber.e("답변 data post 실패") } } \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/data/repository/SettingRepositoryImpl.kt b/app/src/main/java/com/sopt/umbba_android/data/repository/SettingRepositoryImpl.kt index c21eb327..fcbd30c7 100644 --- a/app/src/main/java/com/sopt/umbba_android/data/repository/SettingRepositoryImpl.kt +++ b/app/src/main/java/com/sopt/umbba_android/data/repository/SettingRepositoryImpl.kt @@ -5,6 +5,7 @@ import com.sopt.umbba_android.data.datasource.SettingRemoteDataSource import com.sopt.umbba_android.data.model.response.LogOutResponseDto import com.sopt.umbba_android.data.model.response.SignOutResponseDto import com.sopt.umbba_android.domain.repository.SettingRepository +import timber.log.Timber class SettingRepositoryImpl(private val settingRemoteDataSource: SettingRemoteDataSource) : SettingRepository { @@ -12,17 +13,17 @@ class SettingRepositoryImpl(private val settingRemoteDataSource: SettingRemoteDa runCatching { settingRemoteDataSource.logout() }.onSuccess { - Log.e("hyeon","Impl 로그아웃 성공") + Timber.d("Impl 로그아웃 성공") }.onFailure { - Log.e("hyeon","Impl 로그아웃 실패") + Timber.e("Impl 로그아웃 실패") } override suspend fun signout(): Result = runCatching { settingRemoteDataSource.signout() }.onSuccess { - Log.e("hyeon","Impl 회원탈퇴 성공") + Timber.d("Impl 회원탈퇴 성공") }.onFailure { - Log.e("hyeon","Impl 회원탈퇴 실패") + Timber.e("Impl 회원탈퇴 실패") } } \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt index cfba7c55..ebf7e149 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/home/InviteCodeDialogFragment.kt @@ -22,6 +22,7 @@ import com.kakao.sdk.template.model.Link import com.sopt.umbba_android.R import com.sopt.umbba_android.databinding.FragmentInviteCodeDialogBinding import com.sopt.umbba_android.util.setOnSingleClickListener +import timber.log.Timber class InviteCodeDialogFragment(private val inviteUserName: String, private val inviteCode: String) : DialogFragment() { @@ -73,17 +74,17 @@ class InviteCodeDialogFragment(private val inviteUserName: String, private val i binding.btnSendInvitation.setOnSingleClickListener { val defaultFeed = FeedTemplate( content = Content( - title = "${inviteUserName}으로부터 초대가 왔어요.\n초대 코드 : $inviteCode", - description = "과거로 떠나 함께 추억을 나누고,\n공감대를 형성해보세요.", - imageUrl = "https://github.com/Team-Umbba/Umbba-iOS/assets/75068759/64ba7265-9148-4f06-8235-de5f4030e92f", + title = getString(R.string.kakao_title, inviteUserName, inviteCode), + description = getString(R.string.kakao_description), + imageUrl = getString(R.string.kakao_image_url), link = Link( - webUrl = "https://developers.kakao.com", - mobileWebUrl = "https://developers.kakao.com" + webUrl = getString(R.string.kakao_link), + mobileWebUrl = getString(R.string.kakao_link) ) ), buttons = listOf( Button( - "초대 받기", + getString(R.string.kakao_button), Link( androidExecutionParams = mapOf("key1" to "value1", "key2" to "value2"), iosExecutionParams = mapOf("key1" to "value1", "key2" to "value2") @@ -95,13 +96,13 @@ class InviteCodeDialogFragment(private val inviteUserName: String, private val i if (ShareClient.instance.isKakaoTalkSharingAvailable(requireContext())) { ShareClient.instance.shareDefault(requireContext(), defaultFeed) { sharingResult, error -> if (error != null) { - Log.e("yeonjin", "카카오톡 공유 실패", error) + Timber.e(error, "카카오톡 공유 실패") } else if (sharingResult != null) { - Log.e("yeonjin", "카카오톡 공유 성공 ${sharingResult.intent}") + Timber.d("카카오톡 공유 성공 " + sharingResult.intent) startActivity(sharingResult.intent) - Log.w("yeonjin", "Warning Msg: ${sharingResult.warningMsg}") - Log.w("yeonjin", "Argument Msg: ${sharingResult.argumentMsg}") + Timber.w("Warning Msg: " + sharingResult.warningMsg) + Timber.w("Argument Msg: " + sharingResult.argumentMsg) } } } else { diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/home/viewmodel/HomeViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/home/viewmodel/HomeViewModel.kt index 778b7990..1f64e888 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/home/viewmodel/HomeViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/home/viewmodel/HomeViewModel.kt @@ -29,7 +29,7 @@ class HomeViewModel(private val homeRepositoryImpl: HomeRepositoryImpl) : ViewMo viewModelScope.launch { homeRepositoryImpl.getHomeData() .onSuccess { response -> - Timber.e("getHomeData 성공") + Timber.d("getHomeData 성공") _homeData.value = response.data _topicTitle.value = "#${response.data.index} ${response.data.topic}" }.onFailure { error -> @@ -43,7 +43,7 @@ class HomeViewModel(private val homeRepositoryImpl: HomeRepositoryImpl) : ViewMo homeRepositoryImpl.getResponseCase() .onSuccess { response -> _responseCaseData.value = response.data - Timber.e("getResponseCode 성공") + Timber.d("getResponseCode 성공") }.onFailure { error -> Timber.e("getResponseCode 실패 " + error.message) } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteActivity.kt index c69fcb6c..04ea5a01 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteActivity.kt @@ -9,6 +9,7 @@ import com.sopt.umbba_android.domain.entity.User import com.sopt.umbba_android.presentation.onboarding.CommunicationActivity import com.sopt.umbba_android.util.binding.BindingActivity import com.sopt.umbba_android.util.setOnSingleClickListener +import timber.log.Timber class InviteActivity : BindingActivity(R.layout.activity_invite) { @@ -20,10 +21,8 @@ class InviteActivity : BindingActivity(R.layout.activity_ } private fun goCommunicationActivity() { - // 초대하는 측 binding.btnStart.setOnSingleClickListener { val userData = User(isReceiver = false) - Log.e("yeonjin", "invite parcelable : ${userData.isReceiver}") startActivity(Intent(this, CommunicationActivity::class.java).apply { putExtra("userData", userData) }) @@ -31,10 +30,8 @@ class InviteActivity : BindingActivity(R.layout.activity_ } private fun goInviteCodeActivity() { - // 초대받는 측 binding.btnInputCode.setOnSingleClickListener { val userData = User(isReceiver = true) - Log.e("yeonjin", "invite parcelable : ${userData.isReceiver}") startActivity(Intent(this, InviteCodeActivity::class.java).apply { putExtra("userData", userData) }) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt index 0478c1a9..74ba27c4 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/invite/InviteCodeActivity.kt @@ -75,11 +75,9 @@ class InviteCodeActivity : private fun setFamilyToInviteCode() { binding.btnNext.setOnSingleClickListener { val code = binding.etCode.text.toString() - Log.e("yeonjin", "초대코드 입력 : $code") viewModel.setFamily(code) viewModel.isCodeSuccess.observe(this) { if (it) { - Log.e("yeonjin", "관계 연결 성공") setInviteCodeBoolean(DID_USER_CLEAR_INVITE_CODE, true) goCommunicationActivity() } else { @@ -95,7 +93,6 @@ class InviteCodeActivity : } else { intent.getParcelableExtra("userData") } - Log.e("yeonjin", "inviteCode parcelable : ${userData?.isReceiver}") startActivity(Intent(this, CommunicationActivity::class.java).apply { putExtra("userData", userData) }) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/invite/viewmodel/InviteCodeViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/invite/viewmodel/InviteCodeViewModel.kt index 3f67ddc0..f36edfc9 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/invite/viewmodel/InviteCodeViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/invite/viewmodel/InviteCodeViewModel.kt @@ -1,19 +1,16 @@ package com.sopt.umbba_android.presentation.invite.viewmodel -import android.util.Log import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.sopt.umbba_android.data.model.request.InviteCodeRequestDto -import com.sopt.umbba_android.data.model.response.LoginResponseDto -import com.sopt.umbba_android.data.repository.LoginRepositoryImpl import com.sopt.umbba_android.data.repository.OnboardingRepositoryImpl import kotlinx.coroutines.launch +import timber.log.Timber class InviteCodeViewModel(private val onboardingRepositoryImpl: OnboardingRepositoryImpl) : ViewModel() { val code = MutableLiveData() - val isCodeValidate = MutableLiveData() private val _isCodeSuccess: MutableLiveData = MutableLiveData() @@ -29,10 +26,10 @@ class InviteCodeViewModel(private val onboardingRepositoryImpl: OnboardingReposi onboardingRepositoryImpl.setFamily( InviteCodeRequestDto(inviteCode) ).onSuccess { - Log.e("yeonjin", "Set Family 성공") + Timber.d("Set Family 성공") _isCodeSuccess.value = true }.onFailure { error -> - Log.e("yeonjin", "Set Family 실패 " + error.message + error) + Timber.e("Set Family 실패 $error") _isCodeSuccess.value = false } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt b/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt index 28b60d1f..64fc1eb6 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/list/ListQuestionAdapter.kt @@ -33,7 +33,7 @@ class ListQuestionAdapter(private val itemClick: (ListResponseDto.ListData) -> ( tvTopic.text = data.topic root.setOnSingleClickListener { itemClick(data) - Timber.e("아이템 클릭 이벤트 발생") + Timber.d("아이템 클릭 이벤트 발생") } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/list/viewmodel/ListViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/list/viewmodel/ListViewModel.kt index 11632c3b..d7bd655b 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/list/viewmodel/ListViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/list/viewmodel/ListViewModel.kt @@ -22,8 +22,9 @@ class ListViewModel(private val listRepositoryImpl: ListRepositoryImpl) : ViewMo viewModelScope.launch { listRepositoryImpl.getListData(sectionId).onSuccess { response -> _listResponse.value = response.data + Timber.d("getList 성공") }.onFailure { error -> - Timber.e("getList 실패 " + error.message) + Timber.e("getList 실패 $error") } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/login/LoginActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/login/LoginActivity.kt index 87429394..2fab2160 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/login/LoginActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/login/LoginActivity.kt @@ -19,6 +19,7 @@ import com.sopt.umbba_android.presentation.onboarding.InputInfoActivity import com.sopt.umbba_android.util.ViewModelFactory import com.sopt.umbba_android.util.binding.BindingActivity import com.sopt.umbba_android.util.setOnSingleClickListener +import timber.log.Timber class LoginActivity : BindingActivity(R.layout.activity_login) { @@ -36,14 +37,12 @@ class LoginActivity : BindingActivity(R.layout.activity_lo private fun loginWithKaKao() { val callback: (OAuthToken?, Throwable?) -> Unit = { token, error -> if (error != null) { - Log.e("yeonjin", "카카오계정으로 로그인 실패", error) + Timber.e(error, "카카오계정으로 로그인 실패") } else if (token != null) { - Log.e("yeonjin", "카카오계정으로 로그인 성공 ${token.accessToken}") + Timber.d("카카오계정으로 로그인 성공 " + token.accessToken) FirebaseMessaging.getInstance().token.addOnSuccessListener { fcmToken -> - Log.e("yeonjin", "FCM 토큰 : $fcmToken") SharedPreferences.apply { setKakaoString(USER_KAKAO_TOKEN, token.accessToken) - Log.e("yeonjin", "카카오계정 토큰 저장 : ${getKakaoString(USER_KAKAO_TOKEN)}") } viewModel.login(fcmToken = fcmToken) } @@ -54,18 +53,15 @@ class LoginActivity : BindingActivity(R.layout.activity_lo if (UserApiClient.instance.isKakaoTalkLoginAvailable(this)) { UserApiClient.instance.loginWithKakaoTalk(this) { token, error -> if (error != null) { - Log.e("yeonjin", "카카오톡으로 로그인 실패", error) + Timber.e(error, "카카오톡으로 로그인 실패") - // 사용자가 카카오톡 설치 후 디바이스 권한 요청 화면에서 로그인을 취소한 경우, - // 의도적인 로그인 취소로 보고 카카오계정으로 로그인 시도 없이 로그인 취소로 처리 (예: 뒤로 가기) if (error is ClientError && error.reason == ClientErrorCause.Cancelled) { return@loginWithKakaoTalk } - // 카카오톡에 연결된 카카오계정이 없는 경우, 카카오계정으로 로그인 시도 UserApiClient.instance.loginWithKakaoAccount(this, callback = callback) } else if (token != null) { - Log.e("yeonjin", "카카오톡으로 로그인 성공 ${token.accessToken}") + Timber.d("카카오톡으로 로그인 성공 " + token.accessToken) callback.invoke(token, error) } } @@ -75,11 +71,9 @@ class LoginActivity : BindingActivity(R.layout.activity_lo } } - // 유저 정보, 토큰 세팅 private fun setUserInfo(accessToken: String) { SharedPreferences.apply { setString(USER_TOKEN, accessToken) - Log.e("yeonjin", "서버 토큰 저장 완료 : $accessToken") UserApiClient.instance.me { user, error -> if (error == null && user != null) { setString(USER_NICKNAME, user.kakaoAccount?.profile?.nickname) @@ -89,15 +83,10 @@ class LoginActivity : BindingActivity(R.layout.activity_lo } } - // 자동로그인 private fun setAutoLogin() { - //액세스 토큰이 저장되어 있다면 - Log.e("yeonjin", "setAutoLogin") - Log.e("yeonjin", "sharedPreference : ${SharedPreferences.getString(USER_TOKEN)}") if (!SharedPreferences.getString(USER_TOKEN).isNullOrBlank()) { showOnboardForFirst() } else { - Log.e("yeonjin", "viewmodel gettokenresult") viewModel.getTokenResult.observe(this) { response -> setUserInfo(response.accessToken) if (SharedPreferences.getOnboardingBoolean(DID_USER_CLEAR_ONBOARD) @@ -112,16 +101,13 @@ class LoginActivity : BindingActivity(R.layout.activity_lo } private fun showOnboardForFirst() { - //온보딩을 한번이라도 하지 않았다면 - Log.e("yeonjin", "showOnboardForFirst") if (!SharedPreferences.getOnboardingBoolean(DID_USER_CLEAR_ONBOARD)) { - if (SharedPreferences.getInviteCodeBoolean(DID_USER_CLEAR_INVITE_CODE)) { //초대코드 연결 했다면 + if (SharedPreferences.getInviteCodeBoolean(DID_USER_CLEAR_INVITE_CODE)) { goInputInfoActivity() - } else { //초대코드도 연결 안했다면 + } else { goAgreePrivacyUseActivity() } } else { - //온보딩을 했다면 goMainActivity() } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/login/viewmodel/LoginViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/login/viewmodel/LoginViewModel.kt index 5c8ed100..9155cece 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/login/viewmodel/LoginViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/login/viewmodel/LoginViewModel.kt @@ -10,6 +10,7 @@ import com.sopt.umbba_android.data.model.request.LoginRequestDto import com.sopt.umbba_android.data.model.response.LoginResponseDto import com.sopt.umbba_android.data.repository.LoginRepositoryImpl import kotlinx.coroutines.launch +import timber.log.Timber class LoginViewModel(private val loginRepositoryImpl: LoginRepositoryImpl) : ViewModel() { @@ -19,17 +20,16 @@ class LoginViewModel(private val loginRepositoryImpl: LoginRepositoryImpl) : Vie fun login(fcmToken: String) { viewModelScope.launch { - Log.e("yeonjin", "서버 연결 : fcmToken.$fcmToken") loginRepositoryImpl.postLogin( LoginRequestDto( "KAKAO", fcmToken ) ).onSuccess { response -> - Log.e("yeonjin", "login 성공") + Timber.d("login 성공") _getTokenResult.value = response.data.tokenDto }.onFailure { error -> - Log.e("yeonjin", "login 실패 " + error.message) + Timber.e("login 실패 $error") } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/CommunicationActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/CommunicationActivity.kt index 7fd48d50..083dd518 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/CommunicationActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/CommunicationActivity.kt @@ -24,7 +24,6 @@ class CommunicationActivity : BindingActivity(R.la } else { intent.getParcelableExtra("userData") } - Log.e("yeonjin", "communication parcelable : ${userData?.isReceiver}") startActivity(Intent(this, InputInfoActivity::class.java).apply { putExtra("userData", userData) }) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt index 93605f0b..74e7d66c 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/InputInfoActivity.kt @@ -124,19 +124,11 @@ class InputInfoActivity : BindingActivity(R.layout.act } if (userData != null) { saveInfo(userData) - if (!userData.isReceiver) { //초대하는 사람 - Log.e( - "yeonjin", - "inputInfo parcelable : ${userData?.isReceiver} + ${userData?.name} + ${userData?.gender} + ${userData?.bornYear}" - ) + if (!userData.isReceiver) { startActivity(Intent(this, SelectFamilyActivity::class.java).apply { putExtra("userData", userData) }) - } else { //초대받는 사람 - Log.e( - "yeonjin", - "inputInfo parcelable : ${userData?.isReceiver} + ${userData?.name} + ${userData?.gender} + ${userData?.bornYear}" - ) + } else { startActivity(Intent(this, QuestActivity::class.java).apply { putExtra("userData", userData) }) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt index 43e0834c..c831207e 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/NotifyTimeActivity.kt @@ -23,10 +23,8 @@ class NotifyTimeActivity : private val requestPermissionLauncher = registerForActivityResult(ActivityResultContracts.RequestPermission()) { isGranted: Boolean -> if (isGranted) { - // 알림권한 허용 o Snackbar.make(binding.root, R.string.allow_notification, Snackbar.LENGTH_SHORT).show() } else { - // 알림권한 허용 x Snackbar.make(binding.root, R.string.not_allow_notification, Snackbar.LENGTH_SHORT).show() } } @@ -72,7 +70,6 @@ class NotifyTimeActivity : if (ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED) { Snackbar.make(binding.root, R.string.allowing_notification, Snackbar.LENGTH_SHORT).show() } else if (shouldShowRequestPermissionRationale(Manifest.permission.POST_NOTIFICATIONS)) { - // 왜 알림을 허용해야 하는지에 대한 설명 + 권한 거절 시 권한 설정 화면으로 이동 Snackbar.make(binding.root, R.string.if_allow_notification, Snackbar.LENGTH_SHORT).show() val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).setData(Uri.parse("package:"+ this.packageName)) startActivity(intent) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt index 7c17647f..69013a7a 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SelectFamilyActivity.kt @@ -95,7 +95,6 @@ class SelectFamilyActivity : if (userData != null) { saveInfo(userData) } - Log.e("yeonjin", "selectFamily parcelable : ${userData?.isReceiver} + ${userData?.isInvitorChild} + ${userData?.relationInfo}") startActivity(Intent(this, QuestActivity::class.java).apply { putExtra("userData", userData) }) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt index 6e4ec914..942e02c1 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt @@ -35,11 +35,9 @@ class SetTimeActivity : BindingActivity(R.layout.activit private val requestPermissionLauncher = registerForActivityResult(ActivityResultContracts.RequestPermission()) { isGranted: Boolean -> if (isGranted) { - // 알림권한 허용 o - Snackbar.make(binding.root, "알림 권한이 허용되었습니다.", Snackbar.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.allow_notification, Snackbar.LENGTH_SHORT).show() } else { - // 알림권한 허용 x - Snackbar.make(binding.root, "알림 권한이 없습니다.", Snackbar.LENGTH_SHORT).show() + Snackbar.make(binding.root, R.string.not_allow_notification, Snackbar.LENGTH_SHORT).show() } } @@ -76,7 +74,6 @@ class SetTimeActivity : BindingActivity(R.layout.activit ) { Snackbar.make(binding.root, R.string.allowing_notification, Snackbar.LENGTH_SHORT).show() } else if (shouldShowRequestPermissionRationale(Manifest.permission.POST_NOTIFICATIONS)) { - // 왜 알림을 허용해야 하는지에 대한 설명 + 권한 거절 시 권한 설정 화면으로 이동 Snackbar.make( binding.root, R.string.if_allow_notification, @@ -124,9 +121,7 @@ class SetTimeActivity : BindingActivity(R.layout.activit } else { intent.getParcelableExtra("userData") } - Log.e("yeonjin", "setTime parcelables : $userData") setTime() - Log.e("yeonjin", "설정 시간 : $time") val questData = intent.getStringArrayExtra("questData") setQuestList(questData) viewModel.setSendInfo(userData, time, questList) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt index 65033733..722618f0 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt @@ -61,7 +61,6 @@ class QuestActivity : BindingActivity(R.layout.activity_qu getString(R.string.no) -> viewModel.isClickedNo.value = true getString(R.string.ambiguous) -> viewModel.isClickedAmbiguous.value = true } - Log.d("viewmodel", "pop stack : ${count}번 : ${quest[count].toString()}") } private fun initFragment(fragment: Fragment) { @@ -86,10 +85,7 @@ class QuestActivity : BindingActivity(R.layout.activity_qu private fun clickNextButton() { binding.btnNext.setOnSingleClickListener { - Log.d("viewmodel", "chipText : ${viewModel.clickedChipText.value.toString()}") - Log.d("viewmodel", "count : ${count}") quest[count] = viewModel.clickedChipText.value.toString() - Log.d("viewmodel", "배열 값 : ${quest[count]}") initChip() count += 1 when (count) { @@ -122,26 +118,22 @@ class QuestActivity : BindingActivity(R.layout.activity_qu } private fun goNextActivity() { - Log.e("yeonjin", "${quest[0]}${quest[1]}${quest[2]}${quest[3]}${quest[4]}") val userData = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { intent.getParcelableExtra("userData", User::class.java) } else { intent.getParcelableExtra("userData") } if (userData != null && !userData.isReceiver) { - Log.e("yeonjin", "quest parcelable : ${userData?.isReceiver}") startActivity(Intent(this, SetTimeActivity::class.java).apply { putExtra("questData", quest) putExtra("userData", userData) }) } else { - Log.e("yeonjin", "quest parcelable : ${userData?.isReceiver}") setQuestList(quest) viewModel.setReceiveInfo(userData, questList) viewModel.isPostSuccess.observe(this) { if (it) { val time = viewModel.notifyTime.value - Log.e("yeonjin", "server 연결 : $time") startActivity(Intent(this, NotifyTimeActivity::class.java).apply { putExtra("time", time) }) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestViewModel.kt index ad3b94ae..3ffda6f8 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestViewModel.kt @@ -9,22 +9,20 @@ import com.sopt.umbba_android.data.model.request.ReceiveInfoRequestDto import com.sopt.umbba_android.data.repository.OnboardingRepositoryImpl import com.sopt.umbba_android.domain.entity.User import kotlinx.coroutines.launch +import timber.log.Timber class QuestViewModel(private val onboardingRepositoryImpl: OnboardingRepositoryImpl) : ViewModel() { val isClickedYes = MutableLiveData() val isClickedNo = MutableLiveData() val isClickedAmbiguous = MutableLiveData() - val isClickedComplete = MutableLiveData() - val clickedChipText = MutableLiveData() + val notifyTime = MutableLiveData() private val _isPostSuccess: MutableLiveData = MutableLiveData() val isPostSuccess: LiveData get() = _isPostSuccess - val notifyTime = MutableLiveData() - fun checkButtonComplete() { isClickedComplete.value = isClickedYes.value == true || isClickedNo.value == true || isClickedAmbiguous.value == true } @@ -37,13 +35,12 @@ class QuestViewModel(private val onboardingRepositoryImpl: OnboardingRepositoryI onboardingAnswerList = quest ) ).onSuccess { - Log.e("yeonjin", "setReceiveInfo 성공") - Log.e("yeonjin", "setReceiveInfo time : ${it.data.pushTime}") notifyTime.value = it.data.pushTime _isPostSuccess.value = true + Timber.d("setReceiveInfo 성공") }.onFailure { - Log.e("yeonjin", "setReceiveInfo 실패") _isPostSuccess.value = false + Timber.e("setReceiveInfo 실패") } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/viewmodel/SetTimeViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/viewmodel/SetTimeViewModel.kt index 8e80d219..ff26dda0 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/viewmodel/SetTimeViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/viewmodel/SetTimeViewModel.kt @@ -9,6 +9,7 @@ import com.sopt.umbba_android.data.model.request.SendInfoRequestDto import com.sopt.umbba_android.data.repository.OnboardingRepositoryImpl import com.sopt.umbba_android.domain.entity.User import kotlinx.coroutines.launch +import timber.log.Timber class SetTimeViewModel(private val onboardingRepositoryImpl: OnboardingRepositoryImpl): ViewModel() { @@ -27,12 +28,12 @@ class SetTimeViewModel(private val onboardingRepositoryImpl: OnboardingRepositor onboardingAnswerList = quest ) ).onSuccess { - Log.e("yeonjin", "setSendInfo 성공") _isPostSuccess.value = true + Timber.d("setSendInfo 성공") }.onFailure { error -> - Log.e("yeonjin", "setSendInfo 실패 " + error.message + error) _isPostSuccess.value = false + Timber.e("setSendInfo 실패 $error") } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt index cc6bef1e..9c777b0b 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt @@ -35,7 +35,7 @@ class QuestionAnswerActivity : private fun observeQnaViewFlag() { val qnaId = intent.getLongExtra("questionId", -1) - Timber.e("qnaId activity에서 $qnaId") + Timber.d("qnaId activity에서 $qnaId") if (qnaId == -1L) { viewModel.getQuestionAnswer() viewModel.isBeforeList.value = false diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/AnswerViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/AnswerViewModel.kt index 0ce797d0..4dd431f9 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/AnswerViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/AnswerViewModel.kt @@ -13,11 +13,9 @@ class AnswerViewModel : ViewModel() { var topic = MutableLiveData() fun setDataFromIntent(intent: Intent) { - Log.e("hyeon", "question 들어왔니?" + intent.getStringExtra("question")) question.value = intent.getStringExtra("question") topic.value = "#${intent.getIntExtra("index", -1)} ${intent.getStringExtra("topic")}" - Log.e("hyeon", "index의 값은?" + intent.getIntExtra("index", -1)) section.value = intent.getStringExtra("section") } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/ConfirmAnswerDialogFragmentViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/ConfirmAnswerDialogFragmentViewModel.kt index 5ed7efe9..6d134ff7 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/ConfirmAnswerDialogFragmentViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/ConfirmAnswerDialogFragmentViewModel.kt @@ -30,11 +30,11 @@ class ConfirmAnswerDialogFragmentViewModel(private val questionAnswerRepositoryI viewModelScope.launch { questionAnswerRepositoryImpl.postAnswer(answerRequestDto) .onSuccess { reseponse -> - Timber.e( "postAnswer 성공") responseStatus.value = reseponse.status + Timber.d( "postAnswer 성공") }.onFailure { error -> - Timber.e("postAnswer 실패 " + error.message) responseStatus.value = -1 + Timber.e("postAnswer 실패 $error") } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/QuestionAnswerViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/QuestionAnswerViewModel.kt index d2b8250e..16567d22 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/QuestionAnswerViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/QuestionAnswerViewModel.kt @@ -33,14 +33,14 @@ class QuestionAnswerViewModel(private val questionAnswerRepositoryImpl: Question viewModelScope.launch { questionAnswerRepositoryImpl.getQuestionAnswer() .onSuccess { response -> - Timber.e( "getQuestionAnswer 성공") _qnaResponse.value = response.data isMyAnswer.value = response.data.isMyAnswer isOpponentAnswer.value = response.data.isOpponentAnswer _topicTitle.value = "#${response.data.index} ${response.data.topic}" appbarSection.value = response.data.section.toString() + Timber.d( "getQuestionAnswer 성공") }.onFailure { error -> - Timber.e("getQuestionAnswer 실패 " + error.message) + Timber.e("getQuestionAnswer 실패 $error") } } } @@ -54,7 +54,7 @@ class QuestionAnswerViewModel(private val questionAnswerRepositoryImpl: Question _topicTitle.value = "#${response.data.index} ${response.data.topic}" Timber.e( "getListQuestionAnswer 성공") }.onFailure { error -> - Timber.e( "getListQuestionAnswer 실패" + error.message) + Timber.e("getListQuestionAnswer 실패 $error") } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt b/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt index 9e4a2777..5bd877ed 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/setting/SettingFragment.kt @@ -31,7 +31,6 @@ class SettingFragment : BindingFragment(R.layout.fragmen private val notificationSettingsLauncher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result: ActivityResult -> - // 앱의 설정 화면으로 이동한 후 결과를 처리하는 로직 setSwitchNotification() } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/setting/viewmodel/DeleteAccountViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/setting/viewmodel/DeleteAccountViewModel.kt index 6d6e0cd4..cdb30db2 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/setting/viewmodel/DeleteAccountViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/setting/viewmodel/DeleteAccountViewModel.kt @@ -21,11 +21,11 @@ class DeleteAccountViewModel(private val settingRepositoryImpl: SettingRepositor viewModelScope.launch { settingRepositoryImpl.signout() .onSuccess { response -> - Timber.e("viewModel 회원탈퇴 성공") responseStatus.value = response.status + Timber.d("viewModel 회원탈퇴 성공") }.onFailure { error -> - Timber.e("viewModel 회원탈퇴 실패 " + error.message) responseStatus.value = -1 + Timber.e("viewModel 회원탈퇴 실패 $error") } } } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/setting/viewmodel/ManageAccountViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/setting/viewmodel/ManageAccountViewModel.kt index 2d002689..65e9debe 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/setting/viewmodel/ManageAccountViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/setting/viewmodel/ManageAccountViewModel.kt @@ -16,11 +16,11 @@ class ManageAccountViewModel(private val settingRepositoryImpl: SettingRepositor viewModelScope.launch { settingRepositoryImpl.logout() .onSuccess { response -> - Timber.e("viewmodel logout 성공") responseStatus.value = response.status + Timber.d("viewmodel logout 성공") }.onFailure { error -> - Timber.e( "viewmodel logout 실패 " + error.message) responseStatus.value = -1 + Timber.e("viewmodel logout 실패 $error") } } return responseStatus.value diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3b47e072..28f52b05 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -65,8 +65,8 @@ 저녁 - 매일 %1s %2d시에\n교신을 보내줄게 - 매일 %1s %2d시 반에\n교신을 보내줄게 + 매일 %s %d시에\n교신을 보내줄게 + 매일 %s %d시 반에\n교신을 보내줄게 거의 다 왔어! 조금만 힘내줘! @@ -106,6 +106,11 @@ 카카오톡으로 초대 보내기 초대 코드가 복사되었습니다. 카카오톡을 설치해주세요. + %s으로부터 초대가 왔어요.\n초대코드 : %s + 과거로 떠나 함께 추억을 나누고,\n공감대를 형성해보세요. + https://github.com/Team–Umbba/Umbba–iOS/assets/75068759/64ba7265–9148–4f06–8235-de5f4030e92f + https://developers.kakao.com + 초대 받기 답변을 저장하시겠어요? From 97db889e656467391d41cdab6a0095ccc62fac6f Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 20:08:44 +0900 Subject: [PATCH 11/14] =?UTF-8?q?[Fix/#98]=20String=20=EB=AA=BB=20?= =?UTF-8?q?=EC=9D=BD=EB=8A=94=20=EB=B6=80=EB=B6=84=20=EC=B2=B4=ED=81=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/login/AgreePrivacyUseActivity.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt index a3bd0047..62033497 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/login/AgreePrivacyUseActivity.kt @@ -84,7 +84,7 @@ class AgreePrivacyUseActivity : BindingActivity( private fun setHyperLinkAndColorInTermsTextView() { with(binding) { - setHyperLinkToTextView(R.string.terms_and_condition, tvAgreeTermsAndCondition, "https://harsh-step-7dd.notion.site/f1a14bf60ed4421f9b3761ef88906adb") + setHyperLinkToTextView(getString(R.string.terms_and_condition), tvAgreeTermsAndCondition, "https://harsh-step-7dd.notion.site/f1a14bf60ed4421f9b3761ef88906adb") setLinkTextColorToBlack(tvAgreeTermsAndCondition) setLinkBold(tvAgreeTermsAndCondition, 13) } @@ -92,15 +92,15 @@ class AgreePrivacyUseActivity : BindingActivity( private fun setHyperLinkAndColorInPrivacyTextView() { with(binding) { - setHyperLinkToTextView(R.string.privacy, tvAgreePrivacy, "https://harsh-step-7dd.notion.site/99fe0f58825d4f87bd3b987fadc623b6?pvs=4") + setHyperLinkToTextView(getString(R.string.privacy), tvAgreePrivacy, "https://harsh-step-7dd.notion.site/99fe0f58825d4f87bd3b987fadc623b6?pvs=4") setLinkTextColorToBlack(tvAgreePrivacy) setLinkBold(tvAgreePrivacy, 17) } } - private fun setHyperLinkToTextView(text: Int, view: TextView, uri: String) { + private fun setHyperLinkToTextView(text: String, view: TextView, uri: String) { val transform = Linkify.TransformFilter { match, url -> "" } - val pattern = Pattern.compile(text.toString()) + val pattern = Pattern.compile(text) Linkify.addLinks(view, pattern, uri, null, transform) } From 3c14ee65bc5da04520d52ece508e1dd7df323a47 Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 20:15:03 +0900 Subject: [PATCH 12/14] =?UTF-8?q?[Fix/#98]=20=EC=8B=9C=EA=B0=84=20?= =?UTF-8?q?=EC=9E=98=EB=AA=BB=20=EB=93=A4=EC=96=B4=EA=B0=80=EB=8A=94=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../umbba_android/presentation/onboarding/SetTimeActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt index 942e02c1..74254293 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/SetTimeActivity.kt @@ -93,7 +93,7 @@ class SetTimeActivity : BindingActivity(R.layout.activit val hour = if (binding.tpTime.hour == 0) { "24" - } else if (binding.tpTime.hour >= 1 || binding.tpTime.hour <= 9){ + } else if (binding.tpTime.hour in 1..9){ "0${binding.tpTime.hour}" } else { binding.tpTime.hour From a6bb1d17e891bbf55a3a94f70b7f6b06b0eaf4d2 Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 20:33:23 +0900 Subject: [PATCH 13/14] =?UTF-8?q?[Fix/#98]=20=EC=98=A8=EB=B3=B4=EB=94=A9?= =?UTF-8?q?=20=EC=A2=85=EB=A3=8C=20=ED=9B=84=20=EB=92=A4=EB=A1=9C=20?= =?UTF-8?q?=EA=B0=80=EA=B8=B0=20=ED=96=88=EC=9D=84=20=EB=95=8C=20=EC=98=A8?= =?UTF-8?q?=EB=B3=B4=EB=94=A9=EC=9C=BC=EB=A1=9C=20=EB=8F=8C=EC=95=84?= =?UTF-8?q?=EA=B0=80=EB=8A=94=20=ED=98=84=EC=83=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/onboarding/OnboardingFinishActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/OnboardingFinishActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/OnboardingFinishActivity.kt index 17767970..b133ca2e 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/OnboardingFinishActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/OnboardingFinishActivity.kt @@ -54,7 +54,7 @@ class OnboardingFinishActivity : Intent( this, MainActivity::class.java - ).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) + ).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK) ) } } From 4917c9a588a15b1ddd1389422587bdbe58e2b72e Mon Sep 17 00:00:00 2001 From: yeoncheong Date: Fri, 21 Jul 2023 20:34:10 +0900 Subject: [PATCH 14/14] =?UTF-8?q?[Fix/#98]=20=EC=B4=88=EB=8C=80=EB=B0=9B?= =?UTF-8?q?=EB=8A=94=20=EC=B8=A1=20=EC=98=A8=EB=B3=B4=EB=94=A9=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EB=A1=9C=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/onboarding/quest/QuestActivity.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt index 722618f0..81f90b23 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/onboarding/quest/QuestActivity.kt @@ -10,8 +10,13 @@ import com.sopt.umbba_android.R import androidx.fragment.app.Fragment import androidx.fragment.app.FragmentManager import androidx.fragment.app.commit +import com.sopt.umbba_android.data.local.SharedPreferences +import com.sopt.umbba_android.data.local.SharedPreferences.setOnboardingBoolean import com.sopt.umbba_android.databinding.ActivityQuestBinding import com.sopt.umbba_android.domain.entity.User +import com.sopt.umbba_android.presentation.login.LoginActivity +import com.sopt.umbba_android.presentation.login.LoginActivity.Companion.DID_USER_CLEAR_INVITE_CODE +import com.sopt.umbba_android.presentation.login.LoginActivity.Companion.DID_USER_CLEAR_ONBOARD import com.sopt.umbba_android.presentation.onboarding.NotifyTimeActivity import com.sopt.umbba_android.presentation.onboarding.SetTimeActivity import com.sopt.umbba_android.util.ViewModelFactory @@ -134,6 +139,8 @@ class QuestActivity : BindingActivity(R.layout.activity_qu viewModel.isPostSuccess.observe(this) { if (it) { val time = viewModel.notifyTime.value + setOnboardingBoolean(DID_USER_CLEAR_ONBOARD, true) + setOnboardingBoolean(DID_USER_CLEAR_INVITE_CODE, true) startActivity(Intent(this, NotifyTimeActivity::class.java).apply { putExtra("time", time) })