Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix] 마이페이지 / 변경된 getUser API 명세 반영 #294

Merged
merged 4 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ data class ResponseGetUserDto(
val userId: Int,
@SerialName("nickname")
val nickname: String,
@SerialName("createdDday")
val createdDday: Int,
@SerialName("userLevel")
val userLevel: String,
@SerialName("fcmIsAllowed")
Expand All @@ -23,8 +25,6 @@ data class ResponseGetUserDto(
val accumulatedAmount: Int,
@SerialName("accumulatedCount")
val accumulatedCount: Int,
@SerialName("amountSavedHundredDays")
val amountSavedHundredDays: Int,
@SerialName("amountSavedTwoWeeks")
val amountSavedTwoWeeks: Int,
@SerialName("amountSpentTwoWeeks")
Expand All @@ -42,7 +42,7 @@ data class ResponseGetUserDto(
fcmIsAllowed = userData.fcmIsAllowed,
accumulatedAmount = userData.accumulatedAmount,
accumulatedCount = userData.accumulatedCount,
amountSavedHundredDays = userData.amountSavedHundredDays,
createdDday = userData.createdDday,
amountSavedTwoWeeks = userData.amountSavedTwoWeeks,
amountSpentTwoWeeks = userData.amountSpentTwoWeeks,
remainingAmount = userData.remainingAmount,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class DataStoreRepositoryImpl @Inject constructor(
fcmIsAllowed = true,
accumulatedAmount = 0,
accumulatedCount = 0,
amountSavedHundredDays = 0,
createdDday = 0,
amountSavedTwoWeeks = 0,
amountSpentTwoWeeks = 0,
remainingCount = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ data class UserV2(
val fcmIsAllowed: Boolean,
val accumulatedAmount: Int,
val accumulatedCount: Int,
val amountSavedHundredDays: Int,
val createdDday: Int,
val amountSavedTwoWeeks: Int,
val amountSpentTwoWeeks: Int,
val remainingAmount: Int,
Expand Down
14 changes: 7 additions & 7 deletions app/src/main/res/layout/fragment_my_page.xml
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@

<TextView
android:id="@+id/tv_mypage_item_save"
setAmount="@{data.amountSavedHundredDays}"
setPrefix="@{@string/mypage_save_for_100days_prefix}"
setSuffix="@{@string/mypage_save_for_100days_suffix}"
setAmount="@{data.accumulatedAmount}"
setPrefix="@{data.createdDday + @string/mypage_saved_after_joined_prefix}"
setSuffix="@{@string/mypage_saved_after_joined_suffix}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
Expand Down Expand Up @@ -371,7 +371,7 @@
app:layout_constraintEnd_toStartOf="@+id/l_mypage_item_chicken"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:savedAmount="@{data.amountSavedHundredDays}" />
app:savedAmount="@{data.accumulatedAmount}" />

<include
android:id="@+id/l_mypage_item_chicken"
Expand All @@ -384,7 +384,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/l_mypage_item_coffee"
app:layout_constraintTop_toTopOf="parent"
app:savedAmount="@{data.amountSavedHundredDays}" />
app:savedAmount="@{data.accumulatedAmount}" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand All @@ -408,7 +408,7 @@
app:layout_constraintEnd_toStartOf="@+id/l_mypage_item_airpod"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:savedAmount="@{data.amountSavedHundredDays}" />
app:savedAmount="@{data.accumulatedAmount}" />

<include
android:id="@+id/l_mypage_item_airpod"
Expand All @@ -420,7 +420,7 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/l_mypage_item_sneakers"
app:layout_constraintTop_toTopOf="parent"
app:savedAmount="@{data.amountSavedHundredDays}" />
app:savedAmount="@{data.accumulatedAmount}" />

</androidx.constraintlayout.widget.ConstraintLayout>

Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@
<string name="mypage_2weeks_title">최근 2주간</string>
<string name="mypage_description_eat">%s 이만큼\n먹을 수 있어요</string>
<string name="mypage_description_buy">%s 이만큼\n살 수 있어요</string>
<string name="mypage_save_for_100days_prefix">100일간 총&#160;</string>
<string name="mypage_save_for_100days_suffix">원을 아꼈네요.</string>
<string name="mypage_saved_after_joined_prefix">일간 총&#160;</string>
<string name="mypage_saved_after_joined_suffix">원을 아꼈네요.</string>
<string name="mypage_reamining_amount">%s원만 더!</string>
<string name="mypage_lv4">절약을 통해 황제를 계속 유지해 보세요!</string>
<string name="mypage_current_amount">%s원 절약중</string>
Expand Down
Loading