diff --git a/app/src/main/java/com/aiosman/ravenow/ui/comment/notice/CommentNotice.kt b/app/src/main/java/com/aiosman/ravenow/ui/comment/notice/CommentNotice.kt
index fcffc06..cbafd30 100644
--- a/app/src/main/java/com/aiosman/ravenow/ui/comment/notice/CommentNotice.kt
+++ b/app/src/main/java/com/aiosman/ravenow/ui/comment/notice/CommentNotice.kt
@@ -41,9 +41,8 @@ import com.aiosman.ravenow.R
import com.aiosman.ravenow.entity.CommentEntity
import com.aiosman.ravenow.exp.timeAgo
import com.aiosman.ravenow.ui.NavigationRoute
-import com.aiosman.ravenow.ui.comment.NoticeScreenHeader
import com.aiosman.ravenow.ui.composables.CustomAsyncImage
-import com.aiosman.ravenow.ui.composables.StatusBarSpacer
+import com.aiosman.ravenow.ui.composables.StatusBarMaskLayout
import com.aiosman.ravenow.ui.modifiers.noRippleClickable
import com.aiosman.ravenow.ui.navigateToPost
import kotlinx.coroutines.launch
@@ -68,10 +67,14 @@ fun CommentNoticeScreen(includeStatusBarPadding: Boolean = true){
val navController = LocalNavController.current
val AppColors = LocalAppTheme.current
- Column(
- modifier = Modifier.fillMaxSize().background(color = AppColors.background)
+ StatusBarMaskLayout(
+ modifier = Modifier
+ .background(color = AppColors.background)
+ .padding(horizontal = 16.dp),
+ darkIcons = !AppState.darkMode,
+ maskBoxBackgroundColor = AppColors.background,
+ includeStatusBarPadding = includeStatusBarPadding
) {
- StatusBarSpacer()
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(LocalContext.current)
if (!isNetworkAvailable) {
@@ -109,7 +112,8 @@ fun CommentNoticeScreen(includeStatusBarPadding: Boolean = true){
} else {
LazyColumn(
modifier = Modifier
- .fillMaxSize().padding(horizontal = 16.dp)
+ .weight(1f)
+ .background(color = AppColors.background)
) {
items(comments.itemCount) { index ->
comments[index]?.let { comment ->
@@ -183,55 +187,58 @@ fun CommentNoticeItem(
val navController = LocalNavController.current
val context = LocalContext.current
val AppColors = LocalAppTheme.current
+ val commentPrefix = stringResource(R.string.comment_notice)
Row(
- modifier = Modifier.padding(vertical = 20.dp, horizontal = 16.dp)
+ modifier = Modifier.padding(vertical = 12.dp)
) {
- Box {
- CustomAsyncImage(
- context = context,
- imageUrl = commentItem.avatar,
- contentDescription = commentItem.name,
- modifier = Modifier
- .size(48.dp)
- .clip(CircleShape)
- .noRippleClickable {
- navController.navigate(
- NavigationRoute.AccountProfile.route.replace(
- "{id}",
- commentItem.author.toString()
- )
+ // 左侧头像区域
+ CustomAsyncImage(
+ context = context,
+ imageUrl = commentItem.avatar,
+ contentDescription = commentItem.name,
+ modifier = Modifier
+ .size(40.dp)
+ .clip(CircleShape)
+ .noRippleClickable {
+ navController.navigate(
+ NavigationRoute.AccountProfile.route.replace(
+ "{id}",
+ commentItem.author.toString()
)
- }
- )
- }
+ )
+ }
+ )
+
+ // 右侧内容区域
Row(
modifier = Modifier
.weight(1f)
- .padding(start = 12.dp)
+ .padding(start = 8.dp)
.noRippleClickable {
onPostClick()
}
) {
+ // 主要信息列
Column(
modifier = Modifier.weight(1f)
) {
Text(
text = commentItem.name,
- fontSize = 18.sp,
- modifier = Modifier,
+ fontSize = 14.sp,
color = AppColors.text,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
Spacer(modifier = Modifier.height(4.dp))
+ // 评论内容行
Row {
var text = commentItem.comment
if (commentItem.parentCommentId != null) {
text = "Reply you: $text"
}
Text(
- text = text,
+ text = "$commentPrefix $text",
fontSize = 14.sp,
maxLines = 1,
color = AppColors.secondaryText,
@@ -245,25 +252,20 @@ fun CommentNoticeItem(
color = AppColors.secondaryText,
)
}
-
}
- Spacer(modifier = Modifier.width(24.dp))
+ Spacer(modifier = Modifier.width(4.dp))
+ // 右侧帖子图片
commentItem.post?.let {
Box {
- Box(
- modifier = Modifier.padding(4.dp)
- ) {
- CustomAsyncImage(
- context = context,
- imageUrl = it.images[0].thumbnail,
- contentDescription = "Post Image",
- modifier = Modifier
- .size(48.dp).clip(RoundedCornerShape(8.dp))
- )
- // unread indicator
-
- }
-
+ CustomAsyncImage(
+ context = context,
+ imageUrl = it.images[0].thumbnail,
+ contentDescription = "Post Image",
+ modifier = Modifier
+ .size(40.dp)
+ .clip(RoundedCornerShape(8.dp))
+ )
+ // 未读指示器
if (commentItem.unread) {
Box(
modifier = Modifier
@@ -273,11 +275,7 @@ fun CommentNoticeItem(
)
}
}
-
-
}
}
-
-
}
}
diff --git a/app/src/main/java/com/aiosman/ravenow/ui/follower/FollowerNotice.kt b/app/src/main/java/com/aiosman/ravenow/ui/follower/FollowerNotice.kt
index d4be489..c639f27 100644
--- a/app/src/main/java/com/aiosman/ravenow/ui/follower/FollowerNotice.kt
+++ b/app/src/main/java/com/aiosman/ravenow/ui/follower/FollowerNotice.kt
@@ -141,42 +141,57 @@ fun FollowItem(
val AppColors = LocalAppTheme.current
val context = LocalContext.current
val navController = LocalNavController.current
- Box(
+ val followText = stringResource(R.string.followed_you)
+
+ Row(
modifier = Modifier
- .padding(vertical = 16.dp)
- .noRippleClickable {
- navController.navigate(
- NavigationRoute.AccountProfile.route.replace(
- "{id}",
- userId.toString()
- )
- )
- }
+ .fillMaxWidth()
+ .padding(vertical = 12.dp),
+ verticalAlignment = Alignment.CenterVertically
) {
+ // 左侧头像区域
+ CustomAsyncImage(
+ context = context,
+ imageUrl = avatar,
+ contentDescription = nickname,
+ modifier = Modifier
+ .size(40.dp)
+ .clip(CircleShape)
+ .noRippleClickable {
+ navController.navigate(
+ NavigationRoute.AccountProfile.route.replace(
+ "{id}",
+ userId.toString()
+ )
+ )
+ }
+ )
+ // 右侧内容区域
Row(
- modifier = Modifier.fillMaxWidth(),
- verticalAlignment = Alignment.CenterVertically,
+ modifier = Modifier
+ .weight(1f)
+ .padding(start = 8.dp),
+ verticalAlignment = Alignment.CenterVertically
) {
- CustomAsyncImage(
- context = context,
- imageUrl = avatar,
- contentDescription = nickname,
- modifier = Modifier
- .size(40.dp)
- .clip(CircleShape)
- )
- Spacer(modifier = Modifier.width(12.dp))
Column(
modifier = Modifier.weight(1f)
) {
Text(
text = nickname,
fontWeight = FontWeight.Bold,
- fontSize = 16.sp,
+ fontSize = 14.sp,
color = AppColors.text,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
+ Spacer(modifier = Modifier.height(4.dp))
+ Text(
+ text = followText,
+ fontSize = 14.sp,
+ color = AppColors.secondaryText,
+ maxLines = 1,
+ overflow = TextOverflow.Ellipsis
+ )
}
if (!isFollowing && userId != AppState.UserId) {
FollowButton(
diff --git a/app/src/main/java/com/aiosman/ravenow/ui/like/LikePage.kt b/app/src/main/java/com/aiosman/ravenow/ui/like/LikePage.kt
index 190d4cf..c3581a2 100644
--- a/app/src/main/java/com/aiosman/ravenow/ui/like/LikePage.kt
+++ b/app/src/main/java/com/aiosman/ravenow/ui/like/LikePage.kt
@@ -155,64 +155,83 @@ fun ActionPostNoticeItem(
val navController = LocalNavController.current
val AppColors = LocalAppTheme.current
- Box(
- modifier = Modifier.padding(vertical = 16.dp)
+ val actionLabel = when (action) {
+ "favourite" -> stringResource(R.string.favourite_your_post)
+ else -> stringResource(R.string.like_your_post)
+ }
+
+ Row(
+ modifier = Modifier
+ .fillMaxWidth()
+ .padding(vertical = 12.dp, horizontal = 0.dp),
+ verticalAlignment = Alignment.CenterVertically
) {
+ CustomAsyncImage(
+ context = context,
+ imageUrl = avatar,
+ modifier = Modifier
+ .size(40.dp)
+ .clip(CircleShape)
+ .noRippleClickable {
+ navController.navigate(
+ NavigationRoute.AccountProfile.route.replace(
+ "{id}",
+ userId.toString()
+ )
+ )
+ },
+ contentDescription = action,
+ )
Row(
- modifier = Modifier.fillMaxWidth(),
- verticalAlignment = Alignment.Top,
+ modifier = Modifier
+ .weight(1f)
+ .padding(start = 8.dp)
+ .noRippleClickable {
+ navController.navigateToPost(
+ id = postId,
+ highlightCommentId = 0,
+ initImagePagerIndex = 0
+ )
+ },
+ verticalAlignment = Alignment.CenterVertically
) {
- CustomAsyncImage(
- context,
- imageUrl = avatar,
- modifier = Modifier
- .size(48.dp)
- .clip(CircleShape)
- .noRippleClickable {
- navController.navigate(
- NavigationRoute.AccountProfile.route.replace(
- "{id}",
- userId.toString()
- )
- )
- },
- contentDescription = action,
- )
- Spacer(modifier = Modifier.width(12.dp))
Column(
- modifier = Modifier
- .weight(1f)
- .noRippleClickable {
- navController.navigateToPost(
- id = postId,
- highlightCommentId = 0,
- initImagePagerIndex = 0
- )
- }
+ modifier = Modifier.weight(1f)
) {
Text(
text = nickName,
fontWeight = FontWeight.Bold,
- fontSize = 16.sp,
+ fontSize = 14.sp,
color = AppColors.text,
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
- Spacer(modifier = Modifier.height(2.dp))
- when (action) {
- "like" -> Text(stringResource(R.string.like_your_post), color = AppColors.text)
- "favourite" -> Text(stringResource(R.string.favourite_your_post), color = AppColors.text)
- }
- Spacer(modifier = Modifier.height(2.dp))
- Row {
- Text(likeTime.timeAgo(context), fontSize = 12.sp, color = AppColors.secondaryText)
+ Spacer(modifier = Modifier.height(4.dp))
+ Row(
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ Text(
+ text = actionLabel,
+ fontSize = 14.sp,
+ color = AppColors.secondaryText,
+ modifier = Modifier.weight(1f),
+ maxLines = 1,
+ overflow = TextOverflow.Ellipsis
+ )
+ Spacer(modifier = Modifier.width(4.dp))
+ Text(
+ text = likeTime.timeAgo(context),
+ fontSize = 14.sp,
+ color = AppColors.secondaryText
+ )
}
}
+ Spacer(modifier = Modifier.width(4.dp))
CustomAsyncImage(
- context,
+ context = context,
imageUrl = thumbnail,
modifier = Modifier
- .size(48.dp)
+ .size(40.dp)
.clip(RoundedCornerShape(8.dp)),
contentDescription = action,
)
@@ -227,10 +246,11 @@ fun LikeCommentNoticeItem(
val navController = LocalNavController.current
val context = LocalContext.current
val AppColors = LocalAppTheme.current
+ val previewPost = item.comment?.replyComment?.post ?: item.comment?.post
- Box(
+ Column(
modifier = Modifier
- .padding(vertical = 16.dp)
+ .padding(vertical = 12.dp)
.noRippleClickable {
item.comment?.postId.let {
navController.navigateToPost(
@@ -241,112 +261,103 @@ fun LikeCommentNoticeItem(
}
}
) {
- Row {
- Column(
- modifier = Modifier.weight(1f)
+ Row(
+ verticalAlignment = Alignment.CenterVertically
+ ) {
+ CustomAsyncImage(
+ imageUrl = item.user.avatar,
+ modifier = Modifier
+ .size(40.dp)
+ .clip(CircleShape),
+ contentDescription = stringResource(R.string.like_your_comment)
+ )
+ Row(
+ modifier = Modifier
+ .weight(1f)
+ .padding(start = 8.dp),
+ verticalAlignment = Alignment.CenterVertically
) {
- Row(
- modifier = Modifier.fillMaxWidth(),
- verticalAlignment = Alignment.Top,
+ Column(
+ modifier = Modifier.weight(1f)
) {
- CustomAsyncImage(
- imageUrl = item.user.avatar,
- modifier = Modifier
- .size(48.dp)
- .clip(CircleShape),
- contentDescription = stringResource(R.string.like_your_comment)
+ Text(
+ text = item.user.nickName,
+ fontWeight = FontWeight.Bold,
+ fontSize = 14.sp,
+ color = AppColors.text,
+ maxLines = 1,
+ overflow = TextOverflow.Ellipsis
)
- Spacer(modifier = Modifier.width(12.dp))
- Column(
- modifier = Modifier
- .weight(1f)
+ Spacer(modifier = Modifier.height(4.dp))
+ Row(
+ verticalAlignment = Alignment.CenterVertically
) {
Text(
- text = item.user.nickName,
- fontWeight = FontWeight.Bold,
- fontSize = 16.sp,
- color = AppColors.text,
+ text = stringResource(R.string.like_your_comment),
+ fontSize = 14.sp,
+ color = AppColors.secondaryText,
+ modifier = Modifier.weight(1f),
maxLines = 1,
overflow = TextOverflow.Ellipsis
)
- Spacer(modifier = Modifier.height(2.dp))
- Text(stringResource(R.string.like_your_comment), color = AppColors.text)
- Spacer(modifier = Modifier.height(2.dp))
- Row {
- Text(
- item.likeTime.timeAgo(context),
- fontSize = 12.sp,
- color = AppColors.secondaryText
- )
- }
- }
- }
- Spacer(modifier = Modifier.height(12.dp))
- Row(
- modifier = Modifier.padding(start = 48.dp)
- ) {
- Box(
- modifier = Modifier
- .size(24.dp)
- .background(Color.Gray.copy(alpha = 0.1f))
- ) {
- CustomAsyncImage(
- context = context,
- imageUrl = AppState.profile?.avatar ?: "",
- contentDescription = "Comment Profile Picture",
- modifier = Modifier
- .size(24.dp)
- .clip(RoundedCornerShape(24.dp)),
- contentScale = ContentScale.Crop
- )
- }
- Spacer(modifier = Modifier.width(8.dp))
- Column(
- modifier = Modifier.weight(1f)
- ) {
+ Spacer(modifier = Modifier.width(4.dp))
Text(
- text = AppState.profile?.nickName ?: "",
- fontWeight = FontWeight.W600,
+ text = item.likeTime.timeAgo(context),
fontSize = 14.sp,
- color = AppColors.text
- )
- Text(
- text = item.comment?.content ?: "",
- fontSize = 12.sp,
- color = AppColors.secondaryText,
- maxLines = 2
+ color = AppColors.secondaryText
)
}
}
- }
- Spacer(modifier = Modifier.width(16.dp))
- if (item.comment?.replyComment?.post != null) {
- item.comment.replyComment.post.let {
+ Spacer(modifier = Modifier.width(4.dp))
+ previewPost?.let {
CustomAsyncImage(
context = context,
imageUrl = it.images[0].thumbnail,
contentDescription = "Post Thumbnail",
modifier = Modifier
- .size(48.dp)
- .clip(RoundedCornerShape(8.dp)),
- contentScale = ContentScale.Crop
- )
- }
- } else {
- item.comment?.post?.let {
- CustomAsyncImage(
- context = context,
- imageUrl = it.images[0].thumbnail,
- contentDescription = "Post Thumbnail",
- modifier = Modifier
- .size(48.dp)
+ .size(40.dp)
.clip(RoundedCornerShape(8.dp)),
contentScale = ContentScale.Crop
)
}
}
-
-
+ }
+ Spacer(modifier = Modifier.height(8.dp))
+ Row(
+ modifier = Modifier.padding(start = 48.dp)
+ ) {
+ Box(
+ modifier = Modifier
+ .size(24.dp)
+ .background(Color.Gray.copy(alpha = 0.1f))
+ ) {
+ CustomAsyncImage(
+ context = context,
+ imageUrl = AppState.profile?.avatar ?: "",
+ contentDescription = "Comment Profile Picture",
+ modifier = Modifier
+ .size(24.dp)
+ .clip(RoundedCornerShape(24.dp)),
+ contentScale = ContentScale.Crop
+ )
+ }
+ Spacer(modifier = Modifier.width(8.dp))
+ Column(
+ modifier = Modifier.weight(1f)
+ ) {
+ Text(
+ text = AppState.profile?.nickName ?: "",
+ fontWeight = FontWeight.W600,
+ fontSize = 14.sp,
+ color = AppColors.text
+ )
+ Text(
+ text = item.comment?.content ?: "",
+ fontSize = 12.sp,
+ color = AppColors.secondaryText,
+ maxLines = 2
+ )
+ }
}
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/aiosman/ravenow/ui/notification/Notification.kt b/app/src/main/java/com/aiosman/ravenow/ui/notification/Notification.kt
index 20dbf7c..7f9e39a 100644
--- a/app/src/main/java/com/aiosman/ravenow/ui/notification/Notification.kt
+++ b/app/src/main/java/com/aiosman/ravenow/ui/notification/Notification.kt
@@ -107,7 +107,7 @@ fun NotificationScreen() {
TabSpacer()
TabItem(
- text = stringResource(R.string.followers_upper),
+ text = stringResource(R.string.follow_upper),
isSelected = pagerState.currentPage == 1,
onClick = {
scope.launch {
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index c7bd3a3..5287f98 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -75,6 +75,7 @@
署名
名前
コメント
+ コメント:
デフォルト
最新
最も古い
@@ -102,6 +103,7 @@
Rave Nowのプライバシーポリシー
ギャラリー
チャット
+ フォローしました
あなたの投稿にいいねしました
あなたの投稿をお気に入りにしました
あなたのコメントにいいねしました
diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml
index 9e10ddd..1e0f616 100644
--- a/app/src/main/res/values-zh/strings.xml
+++ b/app/src/main/res/values-zh/strings.xml
@@ -80,6 +80,7 @@
个性签名
昵称
评论
+ 评论:
默认
最新
最早
@@ -107,6 +108,7 @@
用户协议
图片
私信
+ 关注了你
喜欢了你的动态
收藏了你的动态
喜欢了你的评论
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 845bec5..80bb713 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -74,6 +74,7 @@
Signature
Name
COMMENTS
+ commented:
Default
Latest
Earliest
@@ -101,6 +102,7 @@
Rave Now’s Privacy Policy
Gallery
CHAT
+ followed you
Like your post
Favourite your post
Like your comment