Skip to content

Commit 36fb4ea

Browse files
committed
[refactor]: profilebar hoursago int -> string으로 수정(#37)
1 parent ea2cbf7 commit 36fb4ea

7 files changed

Lines changed: 13 additions & 38 deletions

File tree

.idea/deploymentTargetSelector.xml

Lines changed: 0 additions & 24 deletions
This file was deleted.

app/src/main/java/com/texthip/thip/ui/common/header/ProfileBar.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fun ProfileBar(
4040
bottomTextColor: Color = colors.NeonGreen, // todo: 서버에서 색 보내주는걸로 받기?
4141
showSubscriberInfo: Boolean,
4242
subscriberCount: Int = 0,
43-
hoursAgo: Int = 0,
43+
hoursAgo: String = "",
4444
onClick: () -> Unit = { }
4545
) {
4646
Row(
@@ -107,7 +107,7 @@ fun ProfileBar(
107107
}
108108
} else {
109109
Text(
110-
text = stringResource(R.string.hours_ago, hoursAgo),
110+
text = hoursAgo,
111111
style = typography.timedate_r400_s11,
112112
color = colors.Grey01
113113
)
@@ -132,7 +132,7 @@ fun PreviewProfileBar() {
132132
topText = "user.04",
133133
bottomText = stringResource(R.string.influencer),
134134
showSubscriberInfo = false,
135-
hoursAgo = 7
135+
hoursAgo = "10시간 전"
136136
)
137137
}
138138
}

app/src/main/java/com/texthip/thip/ui/mypage/component/SavedFeedCard.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private fun SavedFeedCardPrev() {
126126
userRole = stringResource(R.string.influencer),
127127
bookTitle = "책 제목",
128128
authName = "한강",
129-
timeAgo = 3,
129+
timeAgo = "3시간 전",
130130
content = "무한대로입력가능합니닷무한대로입력가능합니닷무한대로입력가능합니닷무한대로입력가능합니닷무한대로입력가능합니닷무한대로입력가능합니닷무한대로입력가능합니닷무한대로입력가능합니닷",
131131
likeCount = 10,
132132
commentCount = 5,
@@ -142,7 +142,7 @@ private fun SavedFeedCardPrev() {
142142
userRole = stringResource(R.string.influencer),
143143
bookTitle = "책 제목",
144144
authName = "한강",
145-
timeAgo = 3,
145+
timeAgo = "3시간 전",
146146
content = "한줄만 입력 가능",
147147
likeCount = 10,
148148
commentCount = 5,

app/src/main/java/com/texthip/thip/ui/mypage/mock/FeedItem.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ data class FeedItem(
77
val userRole: String,
88
val bookTitle: String,
99
val authName: String,
10-
val timeAgo: Int,
10+
val timeAgo: String,
1111
val content: String,
1212
val likeCount: Int,
1313
val commentCount: Int,

app/src/main/java/com/texthip/thip/ui/mypage/viewmodel/SavedFeedViewModel.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class SavedFeedViewModel: ViewModel() {
1616
userRole = "학생",
1717
bookTitle = "라랄ㄹ라라",
1818
authName = "야야야",
19-
timeAgo = 15,
19+
timeAgo = "15시간 전",
2020
content = "진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공",
2121
likeCount = 25,
2222
commentCount = 4,
@@ -30,7 +30,7 @@ class SavedFeedViewModel: ViewModel() {
3030
userRole = "학생",
3131
bookTitle = "라랄ㄹ라라",
3232
authName = "야야야",
33-
timeAgo = 15,
33+
timeAgo = "15시간 전",
3434
content = "너무 재밌네요..",
3535
likeCount = 25,
3636
commentCount = 4,
@@ -45,7 +45,7 @@ class SavedFeedViewModel: ViewModel() {
4545
userRole = "학생",
4646
bookTitle = "라랄ㄹ라라",
4747
authName = "야야야",
48-
timeAgo = 15,
48+
timeAgo = "15시간 전",
4949
content = "너무 재밌네요..",
5050
likeCount = 25,
5151
commentCount = 4,
@@ -60,7 +60,7 @@ class SavedFeedViewModel: ViewModel() {
6060
userRole = "학생",
6161
bookTitle = "책이름책이름",
6262
authName = "저자이름저자이름",
63-
timeAgo = 25,
63+
timeAgo = "15시간 전",
6464
content = "진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공",
6565
likeCount = 25,
6666
commentCount = 4,
@@ -75,7 +75,7 @@ class SavedFeedViewModel: ViewModel() {
7575
userRole = "학생",
7676
bookTitle = "책이름책이름",
7777
authName = "저자이름저자이름",
78-
timeAgo = 25,
78+
timeAgo = "15시간 전",
7979
content = "진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공진짜최공진짜최공진차최공",
8080
likeCount = 25,
8181
commentCount = 4,

app/src/main/java/com/texthip/thip/ui/signin/SigninNicknameScreen.kt renamed to app/src/main/java/com/texthip/thip/ui/signin/screen/SigninNicknameScreen.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.texthip.thip.ui.signin
1+
package com.texthip.thip.ui.signin.screen
22

33
import androidx.compose.foundation.background
44
import androidx.compose.foundation.layout.Column
@@ -15,7 +15,6 @@ import androidx.compose.ui.tooling.preview.Preview
1515
import androidx.compose.ui.unit.dp
1616
import com.texthip.thip.R
1717
import com.texthip.thip.ui.common.forms.FormTextFieldDefault
18-
import com.texthip.thip.ui.common.topappbar.DefaultTopAppBar
1918
import com.texthip.thip.ui.common.topappbar.InputTopAppBar
2019
import com.texthip.thip.ui.theme.ThipTheme.colors
2120
import com.texthip.thip.ui.theme.ThipTheme.typography

app/src/main/java/com/texthip/thip/ui/signin/SplashScreen.kt renamed to app/src/main/java/com/texthip/thip/ui/signin/screen/SplashScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.texthip.thip.ui.signin
1+
package com.texthip.thip.ui.signin.screen
22

33
import androidx.compose.foundation.background
44
import androidx.compose.foundation.layout.Arrangement

0 commit comments

Comments
 (0)