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"] 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 41c295cb2..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 @@ -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) } } @@ -147,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)) } } 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) + 아직 준비중인 기능입니다 스터디장에게 문의하기 수락을 기다리고 있어요 시작을 기다리고 있어요