From d51a4d91bbe827352262f901d6c905abd797a7d6 Mon Sep 17 00:00:00 2001 From: Yerin Date: Sat, 23 Sep 2023 11:27:24 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20=EC=AA=BD=EC=A7=80=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=ED=81=B4=EB=A6=AD=20=EC=8B=9C=20=EC=A4=80=EB=B9=84?= =?UTF-8?q?=EC=A4=91=EC=9D=B8=20=EA=B8=B0=EB=8A=A5=20alert=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team201/presentation/studyDetail/StudyDetailActivity.kt | 2 ++ android/app/src/main/res/values/strings.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/android/app/src/main/java/com/created/team201/presentation/studyDetail/StudyDetailActivity.kt b/android/app/src/main/java/com/created/team201/presentation/studyDetail/StudyDetailActivity.kt index 41c295cb2..84bd77469 100644 --- a/android/app/src/main/java/com/created/team201/presentation/studyDetail/StudyDetailActivity.kt +++ b/android/app/src/main/java/com/created/team201/presentation/studyDetail/StudyDetailActivity.kt @@ -48,7 +48,9 @@ class StudyDetailActivity : binding.btnStudyDetailSub.setOnClickListener { if (studyDetailViewModel.state.value is Master) { navigateToEditStudyView() + return@setOnClickListener } + showToast(R.string.study_detail_button_preparing_service) } } diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index d7cf4491d..e5e640197 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -78,6 +78,7 @@ 스터디원 참여하기(%d/%d) 시작하기(%d/%d) + 아직 준비중인 기능입니다 스터디장에게 문의하기 수락을 기다리고 있어요 시작을 기다리고 있어요 From 123861e7b2816efc1995753b8c85692f3196f617 Mon Sep 17 00:00:00 2001 From: Yerin Date: Sat, 23 Sep 2023 12:48:10 +0900 Subject: [PATCH 2/3] =?UTF-8?q?refactor:=20=EB=B3=B8=EC=9D=B8=20=ED=81=B4?= =?UTF-8?q?=EB=A6=AD=20=EC=8B=9C=20=EC=83=81=EB=8B=A8=20=EB=B0=94=EB=A5=BC?= =?UTF-8?q?=20=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4=EC=A7=80=EB=A1=9C=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team201/presentation/profile/ProfileActivity.kt | 10 ++++++++-- .../presentation/studyDetail/StudyDetailActivity.kt | 6 ++---- .../studyManagement/StudyManagementActivity.kt | 8 ++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/android/app/src/main/java/com/created/team201/presentation/profile/ProfileActivity.kt b/android/app/src/main/java/com/created/team201/presentation/profile/ProfileActivity.kt index 8ed972561..2881dd800 100644 --- a/android/app/src/main/java/com/created/team201/presentation/profile/ProfileActivity.kt +++ b/android/app/src/main/java/com/created/team201/presentation/profile/ProfileActivity.kt @@ -78,7 +78,11 @@ class ProfileActivity : BindingActivity(R.layout.activit } override fun onCreateOptionsMenu(menu: Menu?): Boolean { - menuInflater.inflate(R.menu.menu_profile, menu) + val isMyProfile = intent.getBooleanExtra(KEY_MY_PROFILE, false) + when (isMyProfile) { + true -> binding.tbProfile.setTitle(R.string.myPage_toolbar_title) + false -> menuInflater.inflate(R.menu.menu_profile, menu) + } return true } @@ -98,9 +102,11 @@ class ProfileActivity : BindingActivity(R.layout.activit companion object { private const val NON_EXISTENCE_USER_ID = 0L private const val KEY_USER_ID = "KEY_USER_ID" - fun getIntent(context: Context, userId: Long): Intent = + private const val KEY_MY_PROFILE = "KEY_MY_PROFILE" + fun getIntent(context: Context, userId: Long, isMyProfile: Boolean = false): Intent = Intent(context, ProfileActivity::class.java).apply { putExtra(KEY_USER_ID, userId) + putExtra(KEY_MY_PROFILE, isMyProfile) } } } diff --git a/android/app/src/main/java/com/created/team201/presentation/studyDetail/StudyDetailActivity.kt b/android/app/src/main/java/com/created/team201/presentation/studyDetail/StudyDetailActivity.kt index 84bd77469..4e1278aca 100644 --- a/android/app/src/main/java/com/created/team201/presentation/studyDetail/StudyDetailActivity.kt +++ b/android/app/src/main/java/com/created/team201/presentation/studyDetail/StudyDetailActivity.kt @@ -149,10 +149,8 @@ class StudyDetailActivity : } override fun onUserClick(memberId: Long) { - if (studyDetailViewModel.myProfile.id == memberId) { - return - } - startActivity(ProfileActivity.getIntent(this, memberId)) + val isMyProfile = studyDetailViewModel.myProfile.id == memberId + startActivity(ProfileActivity.getIntent(this, memberId, isMyProfile)) } private fun observeParticipantsCount() { diff --git a/android/app/src/main/java/com/created/team201/presentation/studyManagement/StudyManagementActivity.kt b/android/app/src/main/java/com/created/team201/presentation/studyManagement/StudyManagementActivity.kt index 5a8964753..af40fa09d 100644 --- a/android/app/src/main/java/com/created/team201/presentation/studyManagement/StudyManagementActivity.kt +++ b/android/app/src/main/java/com/created/team201/presentation/studyManagement/StudyManagementActivity.kt @@ -232,12 +232,8 @@ class StudyManagementActivity : toastDeletedMember() return } - - if (studyManagementViewModel.myProfile.id == id) { - return - } else { - startActivity(ProfileActivity.getIntent(this@StudyManagementActivity, id)) - } + val isMyProfile = studyManagementViewModel.myProfile.id == id + startActivity(ProfileActivity.getIntent(this@StudyManagementActivity, id, isMyProfile)) } } From 15c3134708f110f60e06f268f9f6025131982094 Mon Sep 17 00:00:00 2001 From: Yerin Date: Sun, 24 Sep 2023 17:00:55 +0900 Subject: [PATCH 3/3] chore: v1.1.2 --- android/app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index b4fef296b..27b5efd3d 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -32,8 +32,8 @@ android { applicationId "com.created.team201" minSdk 26 targetSdk 33 - versionCode 3 - versionName "1.1.1" + versionCode 4 + versionName "1.1.2" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" buildConfigField "String", "TEAM201_GIT_HUB_URL", properties["GIT_HUB_URL"]