diff --git a/android/app/src/main/java/com/happy/friendogly/presentation/ui/club/detail/ClubDetailViewModel.kt b/android/app/src/main/java/com/happy/friendogly/presentation/ui/club/detail/ClubDetailViewModel.kt index 350fcf0c8..bf1887589 100644 --- a/android/app/src/main/java/com/happy/friendogly/presentation/ui/club/detail/ClubDetailViewModel.kt +++ b/android/app/src/main/java/com/happy/friendogly/presentation/ui/club/detail/ClubDetailViewModel.kt @@ -46,12 +46,14 @@ class ClubDetailViewModel( val filters = club.value?.filters ?: listOf() _clubDetailEvent.emit(ClubDetailEvent.OpenDogSelector(filters)) } - ClubDetailViewType.MINE -> { + + ClubDetailViewType.MINE, ClubDetailViewType.PARTICIPATED -> { val chatRoomId = club.value?.chatRoomId ?: return _clubDetailEvent.emit( ClubDetailEvent.Navigation.NavigateToChat(chatRoomId), ) } + else -> return } } @@ -74,7 +76,11 @@ class ClubDetailViewModel( participatingPetsId = dogs, ) .onSuccess { clubParticipation -> - _clubDetailEvent.emit(ClubDetailEvent.Navigation.NavigateToChat(clubParticipation.chatRoomId)) + _clubDetailEvent.emit( + ClubDetailEvent.Navigation.NavigateToChat( + clubParticipation.chatRoomId, + ), + ) } .onFailure { _clubDetailEvent.emit(ClubDetailEvent.FailParticipation) diff --git a/android/app/src/main/java/com/happy/friendogly/presentation/ui/mypage/MyPageFragment.kt b/android/app/src/main/java/com/happy/friendogly/presentation/ui/mypage/MyPageFragment.kt index be55d4309..bead1ffc6 100644 --- a/android/app/src/main/java/com/happy/friendogly/presentation/ui/mypage/MyPageFragment.kt +++ b/android/app/src/main/java/com/happy/friendogly/presentation/ui/mypage/MyPageFragment.kt @@ -90,6 +90,7 @@ class MyPageFragment : BaseFragment(R.layout.fragment_my_ super.onResume() viewModel.fetchPetMine() viewModel.fetchMemberMine() + viewModel.updateCurrentPage(binding.vpPetProfile.currentItem) } companion object { diff --git a/android/app/src/main/java/com/happy/friendogly/presentation/ui/mypage/adapter/PetProfileAdapter.kt b/android/app/src/main/java/com/happy/friendogly/presentation/ui/mypage/adapter/PetProfileAdapter.kt index c7a8f92b6..0b6a24019 100644 --- a/android/app/src/main/java/com/happy/friendogly/presentation/ui/mypage/adapter/PetProfileAdapter.kt +++ b/android/app/src/main/java/com/happy/friendogly/presentation/ui/mypage/adapter/PetProfileAdapter.kt @@ -20,6 +20,10 @@ class PetProfileAdapter( setHasStableIds(true) } + override fun getItemId(position: Int): Long { + return getItem(position).id + } + override fun getItemViewType(position: Int): Int { return if (currentList[position] is PetAddView) PET_ADD_VIEW_TYPE else PET_PROFILE_VIEW_TYPE } diff --git a/android/app/src/main/java/com/happy/friendogly/presentation/ui/otherprofile/OtherProfileActivity.kt b/android/app/src/main/java/com/happy/friendogly/presentation/ui/otherprofile/OtherProfileActivity.kt index 954298e0f..f2c392836 100644 --- a/android/app/src/main/java/com/happy/friendogly/presentation/ui/otherprofile/OtherProfileActivity.kt +++ b/android/app/src/main/java/com/happy/friendogly/presentation/ui/otherprofile/OtherProfileActivity.kt @@ -113,6 +113,7 @@ class OtherProfileActivity : override fun onResume() { super.onResume() viewModel.fetchPetMine() + viewModel.updateCurrentPage(binding.vpPetProfile.currentItem) } companion object { diff --git a/android/app/src/main/java/com/happy/friendogly/presentation/ui/otherprofile/adapter/OtherPetProfileAdapter.kt b/android/app/src/main/java/com/happy/friendogly/presentation/ui/otherprofile/adapter/OtherPetProfileAdapter.kt index 81ea9883a..4f4879556 100644 --- a/android/app/src/main/java/com/happy/friendogly/presentation/ui/otherprofile/adapter/OtherPetProfileAdapter.kt +++ b/android/app/src/main/java/com/happy/friendogly/presentation/ui/otherprofile/adapter/OtherPetProfileAdapter.kt @@ -16,6 +16,10 @@ class OtherPetProfileAdapter( setHasStableIds(true) } + override fun getItemId(position: Int): Long { + return getItem(position).id + } + override fun onCreateViewHolder( parent: ViewGroup, viewType: Int, diff --git a/android/app/src/main/java/com/happy/friendogly/presentation/ui/setting/SettingActivity.kt b/android/app/src/main/java/com/happy/friendogly/presentation/ui/setting/SettingActivity.kt index a9eec7452..17ec4a8e8 100644 --- a/android/app/src/main/java/com/happy/friendogly/presentation/ui/setting/SettingActivity.kt +++ b/android/app/src/main/java/com/happy/friendogly/presentation/ui/setting/SettingActivity.kt @@ -96,7 +96,9 @@ class SettingActivity : BaseActivity(R.layout.activity_s is SettingNavigationAction.NavigateToAppInfo -> startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(APP_INFO_URL))) - is SettingNavigationAction.NavigateToPrivacyPolicy -> showSnackbar("준비중이에요") + is SettingNavigationAction.NavigateToPrivacyPolicy -> { + startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(APP_INFO_URL))) + } is SettingNavigationAction.NavigateToLogout -> logOutDialog() is SettingNavigationAction.NavigateToUnsubscribe -> userDeleteDialog() is SettingNavigationAction.NavigateToRegister -> { @@ -179,6 +181,7 @@ class SettingActivity : BaseActivity(R.layout.activity_s companion object { private const val APP_INFO_URL = "https://github.com/woowacourse-teams/2024-friendogly" + private const val PRIVATE_INFO_URL = "https://principled-staircase-b45.notion.site/197be0cd421b437698f639cda10ece04?pvs=4" fun getIntent(context: Context): Intent { return Intent(context, SettingActivity::class.java) diff --git a/android/app/src/main/java/com/happy/friendogly/presentation/utils/GlideImageBindingAdapters.kt b/android/app/src/main/java/com/happy/friendogly/presentation/utils/GlideImageBindingAdapters.kt index 3256bebee..f408b0cb4 100644 --- a/android/app/src/main/java/com/happy/friendogly/presentation/utils/GlideImageBindingAdapters.kt +++ b/android/app/src/main/java/com/happy/friendogly/presentation/utils/GlideImageBindingAdapters.kt @@ -19,6 +19,17 @@ fun ImageView.bindGlide(uri: String?) { .into(this) } +@BindingAdapter("clubGlide") +fun ImageView.bindClubGlide(uri: String?) { + if (uri.isNullOrBlank()) { + this.setImageResource(R.drawable.ic_club_normal) + return + } + Glide.with(context) + .load(uri) + .into(this) +} + @BindingAdapter("glideProfile1000") fun ImageView.bindProfile1000(bitmap: Bitmap?) { if (bitmap == null) { diff --git a/android/app/src/main/res/drawable/ic_club_normal.xml b/android/app/src/main/res/drawable/ic_club_normal.xml index 46f7e7d52..54ffac24a 100644 --- a/android/app/src/main/res/drawable/ic_club_normal.xml +++ b/android/app/src/main/res/drawable/ic_club_normal.xml @@ -5,7 +5,7 @@ android:viewportHeight="110"> + android:fillColor="@color/gray200"/> diff --git a/android/app/src/main/res/layout/activity_club_detail.xml b/android/app/src/main/res/layout/activity_club_detail.xml index 5e10d24df..ccf6e36a8 100644 --- a/android/app/src/main/res/layout/activity_club_detail.xml +++ b/android/app/src/main/res/layout/activity_club_detail.xml @@ -61,7 +61,7 @@ android:backgroundTint="@color/coral30" android:scaleType="centerCrop" android:src="@drawable/ic_club_normal" - app:glide="@{vm.club.clubPoster}" + app:clubGlide="@{vm.club.clubPoster}" app:layout_constraintBottom_toTopOf="@+id/view_club_detail_user_top_bar" app:layout_constraintDimensionRatio="1:1" app:layout_constraintLeft_toLeftOf="parent" @@ -137,7 +137,7 @@ diff --git a/android/app/src/main/res/layout/activity_setting_my_location.xml b/android/app/src/main/res/layout/activity_setting_my_location.xml index e6bfddcfd..db1725384 100644 --- a/android/app/src/main/res/layout/activity_setting_my_location.xml +++ b/android/app/src/main/res/layout/activity_setting_my_location.xml @@ -74,9 +74,6 @@ app:myLocation="@{vm.userAddress}" tools:text="대한민국 제주특별자치도 제주시 이도1동 1250-15" /> - + tools:text="서울 송파구 올림픽로35다길 42서울 송파구 올림픽로35다길 42" /> + android:layout_marginVertical="5dp" + android:background="@drawable/rect_gray_fill_radius8"> + android:layout_height="match_parent" + android:background="@drawable/ripple_rect_fill8_white" + android:padding="10dp"> + app:layout_constraintTop_toTopOf="@id/iv_club_list_poster"> @@ -91,7 +92,7 @@ android:text="@{club.title}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/tv_club_list_club_state" - app:layout_constraintTop_toBottomOf="@id/rcv_club_list_filter_list" + app:layout_constraintTop_toTopOf="parent" tools:text="모임해요~" /> @@ -29,6 +29,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingEnd="5dp" + android:textColor="@color/coral400" android:text="@{clubFilter.filterName}" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -38,11 +39,11 @@ + app:layout_constraintTop_toTopOf="parent" + android:tint="@color/coral400"/> diff --git a/android/app/src/main/res/layout/layout_chat_drawer.xml b/android/app/src/main/res/layout/layout_chat_drawer.xml index 492f75f24..8dc78f0b8 100644 --- a/android/app/src/main/res/layout/layout_chat_drawer.xml +++ b/android/app/src/main/res/layout/layout_chat_drawer.xml @@ -22,13 +22,14 @@ style="@style/Theme.AppCompat.TextView.Regular.Black.Size12" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="18dp" + android:layout_marginTop="30dp" android:text="@string/chat_group_info" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" />