Skip to content

Commit

Permalink
[FEAT] 쿠폰상세 이동 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
kim0hoon committed Oct 5, 2023
1 parent be94fc7 commit ef7dccd
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import com.polzzak_android.R
import com.polzzak_android.presentation.common.model.MemberType
import com.polzzak_android.presentation.feature.notification.list.base.BaseNotificationListFragment
import com.polzzak_android.presentation.feature.notification.list.model.NotificationLinkType
import timber.log.Timber

class KidNotificationListFragment : BaseNotificationListFragment() {
override val actionToSettingFragment: Int =
Expand All @@ -20,8 +19,8 @@ class KidNotificationListFragment : BaseNotificationListFragment() {
is NotificationLinkType.My -> bottomNav?.selectedItemId = R.id.kid_myPage_nav_graph
is NotificationLinkType.Home -> bottomNav?.selectedItemId = R.id.kid_main_nav_graph
is NotificationLinkType.CouponDetail -> {
//TODO bundle, action
Timber.d("move to coupon detail ${type.id}")
val bundle = Bundle().apply { putInt("couponId", type.id) }
findNavController().navigate(R.id.action_to_couponDetailFragment, bundle)
}

is NotificationLinkType.StampDetail -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import com.polzzak_android.R
import com.polzzak_android.presentation.common.model.MemberType
import com.polzzak_android.presentation.feature.notification.list.base.BaseNotificationListFragment
import com.polzzak_android.presentation.feature.notification.list.model.NotificationLinkType
import timber.log.Timber

class ProtectorNotificationListFragment : BaseNotificationListFragment() {
override val actionToSettingFragment: Int =
Expand All @@ -24,8 +23,8 @@ class ProtectorNotificationListFragment : BaseNotificationListFragment() {
R.id.protectorMainFragment

is NotificationLinkType.CouponDetail -> {
//TODO bundle, action
Timber.d("move to coupon detail ${type.id}")
val bundle = Bundle().apply { putInt("couponId", type.id) }
findNavController().navigate(R.id.action_to_couponDetailFragment, bundle)
}

is NotificationLinkType.StampDetail -> {
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/fragment_notification_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="60dp">
android:layout_height="match_parent">

<include
android:id="@+id/inToolbar"
Expand Down
27 changes: 15 additions & 12 deletions app/src/main/res/navigation/kid_nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,24 @@
android:id="@+id/kidCouponFragment"
android:name="com.polzzak_android.presentation.feature.coupon.main.kid.KidCouponFragment"
android:label="KidCouponFragment" >
<action
android:id="@+id/action_to_couponDetailFragment"
app:destination="@id/kidCouponDetailFragment">
<argument
android:name="couponId"
app:argType="integer"
android:defaultValue="-1"/>
</action>
</fragment>
<fragment
android:id="@+id/kidCouponDetailFragment"
android:name="com.polzzak_android.presentation.feature.coupon.detail.kid.KidCouponDetailFragment"
android:label="KidCouponDetailFragment" />

</navigation>

<fragment
android:id="@+id/kidCouponDetailFragment"
android:name="com.polzzak_android.presentation.feature.coupon.detail.kid.KidCouponDetailFragment"
android:label="KidCouponDetailFragment" />

<action
android:id="@+id/action_to_couponDetailFragment"
app:destination="@id/kidCouponDetailFragment">
<argument
android:name="couponId"
app:argType="integer"
android:defaultValue="-1"/>
</action>

<!-- 알림 -->
<navigation
android:id="@+id/kid_notification_nav_graph"
Expand Down
17 changes: 9 additions & 8 deletions app/src/main/res/navigation/protector_nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,22 @@
android:name="com.polzzak_android.presentation.feature.coupon.main.protector.ProtectorCouponFragment"
android:label="ProtectorCouponFragment"
tools:layout="@layout/fragment_protector_coupon" >
<action
android:id="@+id/action_to_couponDetailFragment"
app:destination="@id/protectorCouponDetailFragment">
<argument
android:name="couponId"
app:argType="integer"
android:defaultValue="-1"/>
</action>
</fragment>

<fragment
android:id="@+id/protectorCouponDetailFragment"
android:name="com.polzzak_android.presentation.feature.coupon.detail.protector.ProtectorCouponDetailFragment"
android:label="ProtectorCouponDetailFragment" />

<action
android:id="@+id/action_to_couponDetailFragment"
app:destination="@id/protectorCouponDetailFragment">
<argument
android:name="couponId"
app:argType="integer"
android:defaultValue="-1"/>
</action>

<!-- 알림 -->
<fragment
android:id="@+id/protectorNotificationFragment"
Expand Down

0 comments on commit ef7dccd

Please sign in to comment.