Skip to content

Commit

Permalink
[develop]: 마이 페이지에서 좋아요 탭 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
soopeach committed Mar 13, 2024
1 parent b018b51 commit d253bfc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import org.gdsc.presentation.databinding.FragmentMyPageBinding
import org.gdsc.presentation.utils.repeatWhenUiStarted
import org.gdsc.presentation.view.MainActivity
import org.gdsc.presentation.view.mypage.adapter.MyPagePagerAdapter
import org.gdsc.presentation.view.mypage.adapter.MyPagePagerAdapter.Companion.LIKED_RESTAURANT
import org.gdsc.presentation.view.mypage.adapter.MyPagePagerAdapter.Companion.MY_REVIEW
import org.gdsc.presentation.view.mypage.adapter.MyPagePagerAdapter.Companion.REGISTERED_RESTAURANT
import org.gdsc.presentation.view.mypage.viewmodel.MyPageViewModel
Expand Down Expand Up @@ -104,7 +103,7 @@ class MyPageFragment : Fragment() {
TabLayoutMediator(binding.tabLayout, binding.myPagePager) { tab, position ->
when (position) {
REGISTERED_RESTAURANT -> tab.text = getString(R.string.registered_restaurant)
LIKED_RESTAURANT -> tab.text = getString(R.string.liked_restaurant)
// LIKED_RESTAURANT -> tab.text = getString(R.string.liked_restaurant)
MY_REVIEW -> tab.text = getString(R.string.my_review)
}
}.attach()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package org.gdsc.presentation.view.mypage.adapter

import androidx.fragment.app.Fragment
import androidx.viewpager2.adapter.FragmentStateAdapter
import org.gdsc.presentation.view.mypage.LikedRestaurantFragment
import org.gdsc.presentation.view.mypage.MyReviewFragment
import org.gdsc.presentation.view.mypage.RegisteredRestaurantFragment

Expand All @@ -12,16 +11,16 @@ class MyPagePagerAdapter(fragment: Fragment) : FragmentStateAdapter(fragment) {
override fun createFragment(position: Int): Fragment {
return when (position) {
REGISTERED_RESTAURANT -> RegisteredRestaurantFragment()
LIKED_RESTAURANT -> LikedRestaurantFragment()
// LIKED_RESTAURANT -> LikedRestaurantFragment()
else -> MyReviewFragment()
}
}

companion object {
private const val MY_PAGE_PAGER_SIZE = 3
private const val MY_PAGE_PAGER_SIZE = 2 // 3

const val REGISTERED_RESTAURANT = 0
const val LIKED_RESTAURANT = 1
const val MY_REVIEW = 2
// const val LIKED_RESTAURANT = 1
const val MY_REVIEW = 1 // 2
}
}
2 changes: 1 addition & 1 deletion presentation/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<string name="select_text_counter_max_ten">선택하기 %d/10</string>
<!-- myPage-->
<string name="liked_restaurant">좋아한 맛집</string>
<string name="my_review">나의 후기</string>
<string name="my_review">등록한 후기</string>
<string name="registered_restaurant">등록한 맛집</string>
<string name="follower">팔로워</string>
<string name="following">팔로잉</string>
Expand Down

0 comments on commit d253bfc

Please sign in to comment.