From 994684fe2403cd328e08a6090c2750b8c70dda04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=88=E1=85=A1=E1=86=BC=E1=84=8C?= =?UTF-8?q?=E1=85=AE?= Date: Tue, 11 Jun 2024 18:56:18 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[ui]=20=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=97=90=20=EC=95=8C=EB=A6=BC=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=ED=85=8D=EC=8A=A4=ED=8A=B8=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/res/layout/fragment_my_page.xml | 28 +++++++++++++++++--- app/src/main/res/values/strings.xml | 3 ++- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/fragment_my_page.xml b/app/src/main/res/layout/fragment_my_page.xml index f0ed7f0d..34c0879a 100644 --- a/app/src/main/res/layout/fragment_my_page.xml +++ b/app/src/main/res/layout/fragment_my_page.xml @@ -92,19 +92,41 @@ + + + + - \ No newline at end of file + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 6a9c5c1a..61db748e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -81,6 +81,7 @@ 북과픽 안녕하세요. 저는 북과픽입니다. + 알림 설정 차단사용자 관리하기 문의하기 @@ -218,4 +219,4 @@ 앗! 피카북이 달라졌어요 업데이트 하러 가기 https://play.google.com/store/apps/details?id=com.sopt.peekabookaos&hl=ko-KR - \ No newline at end of file + From 62efddc705bf821b75a2d814b40eead628143498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=88=E1=85=A1=E1=86=BC=E1=84=8C?= =?UTF-8?q?=E1=85=AE?= Date: Tue, 11 Jun 2024 19:31:46 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=EC=84=A4=EC=A0=95=EC=B0=BD?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EB=B3=B4=EB=82=B4=EB=8A=94=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EA=B5=AC=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/myPage/MyPageFragment.kt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt b/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt index a1e62370..2fe3b86b 100644 --- a/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt +++ b/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt @@ -1,10 +1,14 @@ package com.sopt.peekabookaos.presentation.myPage +import android.Manifest import android.content.Intent +import android.content.pm.PackageManager import android.net.Uri import android.os.Build import android.os.Bundle +import android.provider.Settings import android.view.View +import androidx.core.content.ContextCompat import androidx.fragment.app.viewModels import com.google.android.gms.oss.licenses.OssLicensesMenuActivity import com.sopt.peekabookaos.R @@ -20,6 +24,7 @@ import dagger.hilt.android.AndroidEntryPoint @AndroidEntryPoint class MyPageFragment : BindingFragment(R.layout.fragment_my_page) { private val myPageViewModel: MyPageViewModel by viewModels() + private val notificationPermissionRequestCode = 101 override fun onResume() { super.onResume() @@ -29,6 +34,7 @@ class MyPageFragment : BindingFragment(R.layout.fragment_ override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) binding.viewModel = myPageViewModel + initNotificationBtnClickListener() initBlockBtnClickListener() initWithdrawBtnClickListener() initLogoutBtnClickListener() @@ -39,6 +45,23 @@ class MyPageFragment : BindingFragment(R.layout.fragment_ initOpenSourceClickListener() } + private fun initNotificationBtnClickListener() { + binding.tvMyPageNotification.setSingleOnClickListener { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + if (ContextCompat.checkSelfPermission( + requireContext(), + Manifest.permission.POST_NOTIFICATIONS + ) == PackageManager.PERMISSION_DENIED + ) { + val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply { + data = Uri.fromParts("package", requireContext().packageName, null) + } + requireContext().startActivity(intent) + } + } + } + } + private fun initBlockBtnClickListener() { binding.tvMyPageBlock.setSingleOnClickListener { startActivity(Intent(requireActivity(), BlockedUserActivity::class.java)) From aa8fe17d1393a3fa021d3b94cdf16a62d5e05cc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=B5=E1=84=88=E1=85=A1=E1=86=BC=E1=84=8C?= =?UTF-8?q?=E1=85=AE?= Date: Tue, 11 Jun 2024 19:34:32 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=EC=84=A4=EC=A0=95=EC=B0=BD=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EA=B0=80=EB=8A=94=20=EC=A1=B0=EA=B1=B4=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/myPage/MyPageFragment.kt | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt b/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt index 2fe3b86b..722cde01 100644 --- a/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt +++ b/app/src/main/java/com/sopt/peekabookaos/presentation/myPage/MyPageFragment.kt @@ -1,14 +1,11 @@ package com.sopt.peekabookaos.presentation.myPage -import android.Manifest import android.content.Intent -import android.content.pm.PackageManager import android.net.Uri import android.os.Build import android.os.Bundle import android.provider.Settings import android.view.View -import androidx.core.content.ContextCompat import androidx.fragment.app.viewModels import com.google.android.gms.oss.licenses.OssLicensesMenuActivity import com.sopt.peekabookaos.R @@ -47,18 +44,10 @@ class MyPageFragment : BindingFragment(R.layout.fragment_ private fun initNotificationBtnClickListener() { binding.tvMyPageNotification.setSingleOnClickListener { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - if (ContextCompat.checkSelfPermission( - requireContext(), - Manifest.permission.POST_NOTIFICATIONS - ) == PackageManager.PERMISSION_DENIED - ) { - val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply { - data = Uri.fromParts("package", requireContext().packageName, null) - } - requireContext().startActivity(intent) - } + val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS).apply { + data = Uri.fromParts("package", requireContext().packageName, null) } + requireContext().startActivity(intent) } }