@@ -617,7 +617,7 @@ fun ChatAiInput(
|
|||||||
animationSpec = tween(300)
|
animationSpec = tween(300)
|
||||||
)
|
)
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(R.mipmap.rider_pro_im_send),
|
painter = painterResource(R.mipmap.btn),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(24.dp)
|
.size(24.dp)
|
||||||
.alpha(alpha)
|
.alpha(alpha)
|
||||||
|
|||||||
@@ -650,7 +650,7 @@ fun ChatInput(
|
|||||||
animationSpec = tween(300)
|
animationSpec = tween(300)
|
||||||
)
|
)
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(R.mipmap.rider_pro_im_send),
|
painter = painterResource(R.mipmap.btn),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(24.dp)
|
.size(24.dp)
|
||||||
.alpha(alpha)
|
.alpha(alpha)
|
||||||
|
|||||||
@@ -183,45 +183,21 @@ fun GroupChatScreen(groupId: String,name: String,avatar: String,) {
|
|||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(16.dp))
|
Spacer(modifier = Modifier.width(16.dp))
|
||||||
|
|
||||||
if (viewModel.groupAvatar.isNotEmpty()) {
|
if (viewModel.groupInfo?.groupAvatar?.isNotEmpty() == true) {
|
||||||
CustomAsyncImage(
|
CustomAsyncImage(
|
||||||
imageUrl = viewModel.groupAvatar,
|
imageUrl = viewModel.groupInfo!!.groupAvatar,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(32.dp)
|
.size(35.dp)
|
||||||
.clip(RoundedCornerShape(8.dp))
|
.clip(RoundedCornerShape(15.dp)),
|
||||||
.noRippleClickable {
|
|
||||||
navController.navigateToGroupInfo(groupId)
|
|
||||||
},
|
|
||||||
contentDescription = "群聊头像"
|
contentDescription = "群聊头像"
|
||||||
)
|
)
|
||||||
} else {
|
|
||||||
Box(
|
|
||||||
modifier = Modifier
|
|
||||||
.size(24.dp)
|
|
||||||
.clip(RoundedCornerShape(8.dp))
|
|
||||||
.background(AppColors.decentBackground)
|
|
||||||
.noRippleClickable {
|
|
||||||
navController.navigateToGroupInfo(groupId)
|
|
||||||
},
|
|
||||||
contentAlignment = Alignment.Center
|
|
||||||
) {
|
|
||||||
Text(
|
|
||||||
text = viewModel.groupName,
|
|
||||||
style = TextStyle(
|
|
||||||
color = AppColors.text,
|
|
||||||
fontSize = 18.sp,
|
|
||||||
|
|
||||||
fontWeight = androidx.compose.ui.text.font.FontWeight.W700
|
|
||||||
),
|
|
||||||
maxLines = 1,
|
|
||||||
overflow =TextOverflow.Ellipsis,
|
|
||||||
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.width(8.dp))
|
Spacer(modifier = Modifier.width(8.dp))
|
||||||
Column {
|
Column(
|
||||||
|
modifier = Modifier.weight(1f),
|
||||||
|
horizontalAlignment = Alignment.Start
|
||||||
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = viewModel.groupName,
|
text = viewModel.groupName,
|
||||||
style = TextStyle(
|
style = TextStyle(
|
||||||
@@ -230,12 +206,10 @@ fun GroupChatScreen(groupId: String,name: String,avatar: String,) {
|
|||||||
fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
|
fontWeight = androidx.compose.ui.text.font.FontWeight.Bold
|
||||||
),
|
),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow =TextOverflow.Ellipsis,
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer(modifier = Modifier.weight(1f))
|
|
||||||
Box {
|
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(R.drawable.rider_pro_more_horizon),
|
painter = painterResource(R.drawable.rider_pro_more_horizon),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -243,12 +217,11 @@ fun GroupChatScreen(groupId: String,name: String,avatar: String,) {
|
|||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
navController.navigateToGroupInfo(groupId)
|
navController.navigateToGroupInfo(groupId)
|
||||||
},
|
},
|
||||||
contentDescription = null,
|
contentDescription = "更多",
|
||||||
colorFilter = ColorFilter.tint(AppColors.text)
|
colorFilter = ColorFilter.tint(AppColors.text)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
bottomBar = {
|
bottomBar = {
|
||||||
Column(
|
Column(
|
||||||
@@ -677,7 +650,7 @@ fun GroupChatInput(
|
|||||||
animationSpec = tween(300)
|
animationSpec = tween(300)
|
||||||
)
|
)
|
||||||
Image(
|
Image(
|
||||||
painter = painterResource(R.mipmap.rider_pro_im_send),
|
painter = painterResource(R.mipmap.btn),
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(24.dp)
|
.size(24.dp)
|
||||||
.alpha(alpha)
|
.alpha(alpha)
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
package com.aiosman.ravenow.ui.chat
|
package com.aiosman.ravenow.ui.chat
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.util.Base64
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.compose.runtime.getValue
|
import androidx.compose.runtime.getValue
|
||||||
import androidx.compose.runtime.mutableStateOf
|
import androidx.compose.runtime.mutableStateOf
|
||||||
import androidx.compose.runtime.setValue
|
import androidx.compose.runtime.setValue
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
|
import com.aiosman.ravenow.AppStore
|
||||||
import com.aiosman.ravenow.data.api.ApiClient
|
import com.aiosman.ravenow.data.api.ApiClient
|
||||||
import com.aiosman.ravenow.data.api.SendChatAiRequestBody
|
import com.aiosman.ravenow.data.api.SendChatAiRequestBody
|
||||||
import io.openim.android.sdk.enums.ConversationType
|
import io.openim.android.sdk.enums.ConversationType
|
||||||
@@ -50,7 +52,34 @@ class GroupChatViewModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun getGroupInfo() {
|
private suspend fun getGroupInfo() {
|
||||||
// 简化群组信息获取,使用默认信息
|
try {
|
||||||
|
val response = ApiClient.api.getRoomDetail(trtcId = groupId)
|
||||||
|
val room = response.body()?.data
|
||||||
|
groupInfo = room?.let {
|
||||||
|
GroupInfo(
|
||||||
|
groupId = groupId,
|
||||||
|
groupName = it.name,
|
||||||
|
groupAvatar = if (it.avatar.isNullOrEmpty()) {
|
||||||
|
val groupIdBase64 = Base64.encodeToString(
|
||||||
|
groupId.toByteArray(),
|
||||||
|
Base64.NO_WRAP
|
||||||
|
)
|
||||||
|
"${ApiClient.RETROFIT_URL}group/avatar?groupIdBase64=$groupIdBase64&token=${AppStore.token}"
|
||||||
|
} else {
|
||||||
|
"${ApiClient.BASE_API_URL}/outside${it.avatar}?token=${AppStore.token}"
|
||||||
|
},
|
||||||
|
memberCount = it.userCount,
|
||||||
|
ownerId = it.creator.userId
|
||||||
|
)
|
||||||
|
} ?: GroupInfo(
|
||||||
|
groupId = groupId,
|
||||||
|
groupName = name,
|
||||||
|
groupAvatar = avatar,
|
||||||
|
memberCount = 0,
|
||||||
|
ownerId = ""
|
||||||
|
)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.e("GroupChatViewModel", "加载群信息失败: ${e.message}", e)
|
||||||
groupInfo = GroupInfo(
|
groupInfo = GroupInfo(
|
||||||
groupId = groupId,
|
groupId = groupId,
|
||||||
groupName = name,
|
groupName = name,
|
||||||
@@ -58,10 +87,12 @@ class GroupChatViewModel(
|
|||||||
memberCount = 0,
|
memberCount = 0,
|
||||||
ownerId = ""
|
ownerId = ""
|
||||||
)
|
)
|
||||||
|
} finally {
|
||||||
groupName = groupInfo?.groupName ?: ""
|
groupName = groupInfo?.groupName ?: ""
|
||||||
groupAvatar = groupInfo?.groupAvatar ?: ""
|
groupAvatar = groupInfo?.groupAvatar ?: ""
|
||||||
memberCount = groupInfo?.memberCount ?: 0
|
memberCount = groupInfo?.memberCount ?: 0
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun getConversationParams(): Triple<String, Int, Boolean> {
|
override fun getConversationParams(): Triple<String, Int, Boolean> {
|
||||||
// 根据群组类型决定ConversationType,这里假设是普通群聊
|
// 根据群组类型决定ConversationType,这里假设是普通群聊
|
||||||
|
|||||||
@@ -41,9 +41,8 @@ import com.aiosman.ravenow.R
|
|||||||
import com.aiosman.ravenow.entity.CommentEntity
|
import com.aiosman.ravenow.entity.CommentEntity
|
||||||
import com.aiosman.ravenow.exp.timeAgo
|
import com.aiosman.ravenow.exp.timeAgo
|
||||||
import com.aiosman.ravenow.ui.NavigationRoute
|
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.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.modifiers.noRippleClickable
|
||||||
import com.aiosman.ravenow.ui.navigateToPost
|
import com.aiosman.ravenow.ui.navigateToPost
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
@@ -68,10 +67,14 @@ fun CommentNoticeScreen(includeStatusBarPadding: Boolean = true){
|
|||||||
val navController = LocalNavController.current
|
val navController = LocalNavController.current
|
||||||
val AppColors = LocalAppTheme.current
|
val AppColors = LocalAppTheme.current
|
||||||
|
|
||||||
Column(
|
StatusBarMaskLayout(
|
||||||
modifier = Modifier.fillMaxSize().background(color = AppColors.background)
|
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)
|
val isNetworkAvailable = NetworkUtils.isNetworkAvailable(LocalContext.current)
|
||||||
|
|
||||||
if (!isNetworkAvailable) {
|
if (!isNetworkAvailable) {
|
||||||
@@ -109,7 +112,8 @@ fun CommentNoticeScreen(includeStatusBarPadding: Boolean = true){
|
|||||||
} else {
|
} else {
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxSize().padding(horizontal = 16.dp)
|
.weight(1f)
|
||||||
|
.background(color = AppColors.background)
|
||||||
) {
|
) {
|
||||||
items(comments.itemCount) { index ->
|
items(comments.itemCount) { index ->
|
||||||
comments[index]?.let { comment ->
|
comments[index]?.let { comment ->
|
||||||
@@ -183,17 +187,18 @@ fun CommentNoticeItem(
|
|||||||
val navController = LocalNavController.current
|
val navController = LocalNavController.current
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val AppColors = LocalAppTheme.current
|
val AppColors = LocalAppTheme.current
|
||||||
|
val commentPrefix = stringResource(R.string.comment_notice)
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.padding(vertical = 20.dp, horizontal = 16.dp)
|
modifier = Modifier.padding(vertical = 12.dp)
|
||||||
) {
|
) {
|
||||||
Box {
|
// 左侧头像区域
|
||||||
CustomAsyncImage(
|
CustomAsyncImage(
|
||||||
context = context,
|
context = context,
|
||||||
imageUrl = commentItem.avatar,
|
imageUrl = commentItem.avatar,
|
||||||
contentDescription = commentItem.name,
|
contentDescription = commentItem.name,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(48.dp)
|
.size(40.dp)
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
navController.navigate(
|
navController.navigate(
|
||||||
@@ -204,34 +209,36 @@ fun CommentNoticeItem(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
|
||||||
|
// 右侧内容区域
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
.padding(start = 12.dp)
|
.padding(start = 8.dp)
|
||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
onPostClick()
|
onPostClick()
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
|
// 主要信息列
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = commentItem.name,
|
text = commentItem.name,
|
||||||
fontSize = 18.sp,
|
fontSize = 14.sp,
|
||||||
modifier = Modifier,
|
|
||||||
color = AppColors.text,
|
color = AppColors.text,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(4.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
|
// 评论内容行
|
||||||
Row {
|
Row {
|
||||||
var text = commentItem.comment
|
var text = commentItem.comment
|
||||||
if (commentItem.parentCommentId != null) {
|
if (commentItem.parentCommentId != null) {
|
||||||
text = "Reply you: $text"
|
text = "Reply you: $text"
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = text,
|
text = "$commentPrefix $text",
|
||||||
fontSize = 14.sp,
|
fontSize = 14.sp,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
color = AppColors.secondaryText,
|
color = AppColors.secondaryText,
|
||||||
@@ -245,25 +252,20 @@ fun CommentNoticeItem(
|
|||||||
color = AppColors.secondaryText,
|
color = AppColors.secondaryText,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.width(24.dp))
|
Spacer(modifier = Modifier.width(4.dp))
|
||||||
|
// 右侧帖子图片
|
||||||
commentItem.post?.let {
|
commentItem.post?.let {
|
||||||
Box {
|
Box {
|
||||||
Box(
|
|
||||||
modifier = Modifier.padding(4.dp)
|
|
||||||
) {
|
|
||||||
CustomAsyncImage(
|
CustomAsyncImage(
|
||||||
context = context,
|
context = context,
|
||||||
imageUrl = it.images[0].thumbnail,
|
imageUrl = it.images[0].thumbnail,
|
||||||
contentDescription = "Post Image",
|
contentDescription = "Post Image",
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(48.dp).clip(RoundedCornerShape(8.dp))
|
.size(40.dp)
|
||||||
|
.clip(RoundedCornerShape(8.dp))
|
||||||
)
|
)
|
||||||
// unread indicator
|
// 未读指示器
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (commentItem.unread) {
|
if (commentItem.unread) {
|
||||||
Box(
|
Box(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
@@ -273,11 +275,7 @@ fun CommentNoticeItem(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,9 +141,22 @@ fun FollowItem(
|
|||||||
val AppColors = LocalAppTheme.current
|
val AppColors = LocalAppTheme.current
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val navController = LocalNavController.current
|
val navController = LocalNavController.current
|
||||||
Box(
|
val followText = stringResource(R.string.followed_you)
|
||||||
|
|
||||||
|
Row(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(vertical = 16.dp)
|
.fillMaxWidth()
|
||||||
|
.padding(vertical = 12.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically
|
||||||
|
) {
|
||||||
|
// 左侧头像区域
|
||||||
|
CustomAsyncImage(
|
||||||
|
context = context,
|
||||||
|
imageUrl = avatar,
|
||||||
|
contentDescription = nickname,
|
||||||
|
modifier = Modifier
|
||||||
|
.size(40.dp)
|
||||||
|
.clip(CircleShape)
|
||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
navController.navigate(
|
navController.navigate(
|
||||||
NavigationRoute.AccountProfile.route.replace(
|
NavigationRoute.AccountProfile.route.replace(
|
||||||
@@ -152,31 +165,33 @@ fun FollowItem(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
) {
|
|
||||||
Row(
|
|
||||||
modifier = Modifier.fillMaxWidth(),
|
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
|
||||||
) {
|
|
||||||
CustomAsyncImage(
|
|
||||||
context = context,
|
|
||||||
imageUrl = avatar,
|
|
||||||
contentDescription = nickname,
|
|
||||||
modifier = Modifier
|
|
||||||
.size(40.dp)
|
|
||||||
.clip(CircleShape)
|
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(12.dp))
|
// 右侧内容区域
|
||||||
|
Row(
|
||||||
|
modifier = Modifier
|
||||||
|
.weight(1f)
|
||||||
|
.padding(start = 8.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically
|
||||||
|
) {
|
||||||
Column(
|
Column(
|
||||||
modifier = Modifier.weight(1f)
|
modifier = Modifier.weight(1f)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = nickname,
|
text = nickname,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
fontSize = 16.sp,
|
fontSize = 14.sp,
|
||||||
color = AppColors.text,
|
color = AppColors.text,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis
|
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) {
|
if (!isFollowing && userId != AppState.UserId) {
|
||||||
FollowButton(
|
FollowButton(
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.aiosman.ravenow.ui.group
|
|||||||
|
|
||||||
import androidx.compose.foundation.Image
|
import androidx.compose.foundation.Image
|
||||||
import androidx.compose.foundation.background
|
import androidx.compose.foundation.background
|
||||||
|
import androidx.compose.foundation.border
|
||||||
import androidx.compose.foundation.layout.*
|
import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.lazy.LazyColumn
|
import androidx.compose.foundation.lazy.LazyColumn
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
@@ -302,8 +303,9 @@ fun GroupChatInfoScreen(groupId: String) {
|
|||||||
Column(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
.border(1.dp, AppColors.decentBackground, RoundedCornerShape(12.dp))
|
||||||
.clip(RoundedCornerShape(12.dp))
|
.clip(RoundedCornerShape(12.dp))
|
||||||
.background(AppColors.decentBackground.copy(alpha = 0.28f))
|
.background(AppColors.background)
|
||||||
.padding(12.dp)
|
.padding(12.dp)
|
||||||
) {
|
) {
|
||||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||||
@@ -340,7 +342,7 @@ fun GroupChatInfoScreen(groupId: String) {
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
.clip(RoundedCornerShape(20.dp))
|
.clip(RoundedCornerShape(20.dp))
|
||||||
.background(AppColors.background)
|
.background(AppColors.decentBackground)
|
||||||
.padding(vertical = 8.dp)
|
.padding(vertical = 8.dp)
|
||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
showAddMemoryDialog = true
|
showAddMemoryDialog = true
|
||||||
@@ -359,7 +361,7 @@ fun GroupChatInfoScreen(groupId: String) {
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
.clip(RoundedCornerShape(20.dp))
|
.clip(RoundedCornerShape(20.dp))
|
||||||
.background(AppColors.background)
|
.background(AppColors.decentBackground)
|
||||||
.padding(vertical = 8.dp)
|
.padding(vertical = 8.dp)
|
||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
showMemoryManageDialog = true
|
showMemoryManageDialog = true
|
||||||
|
|||||||
@@ -155,18 +155,22 @@ fun ActionPostNoticeItem(
|
|||||||
val navController = LocalNavController.current
|
val navController = LocalNavController.current
|
||||||
val AppColors = LocalAppTheme.current
|
val AppColors = LocalAppTheme.current
|
||||||
|
|
||||||
Box(
|
val actionLabel = when (action) {
|
||||||
modifier = Modifier.padding(vertical = 16.dp)
|
"favourite" -> stringResource(R.string.favourite_your_post)
|
||||||
) {
|
else -> stringResource(R.string.like_your_post)
|
||||||
|
}
|
||||||
|
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier
|
||||||
verticalAlignment = Alignment.Top,
|
.fillMaxWidth()
|
||||||
|
.padding(vertical = 12.dp, horizontal = 0.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
CustomAsyncImage(
|
CustomAsyncImage(
|
||||||
context,
|
context = context,
|
||||||
imageUrl = avatar,
|
imageUrl = avatar,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(48.dp)
|
.size(40.dp)
|
||||||
.clip(CircleShape)
|
.clip(CircleShape)
|
||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
navController.navigate(
|
navController.navigate(
|
||||||
@@ -178,41 +182,56 @@ fun ActionPostNoticeItem(
|
|||||||
},
|
},
|
||||||
contentDescription = action,
|
contentDescription = action,
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(12.dp))
|
Row(
|
||||||
Column(
|
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
|
.padding(start = 8.dp)
|
||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
navController.navigateToPost(
|
navController.navigateToPost(
|
||||||
id = postId,
|
id = postId,
|
||||||
highlightCommentId = 0,
|
highlightCommentId = 0,
|
||||||
initImagePagerIndex = 0
|
initImagePagerIndex = 0
|
||||||
)
|
)
|
||||||
}
|
},
|
||||||
|
verticalAlignment = Alignment.CenterVertically
|
||||||
|
) {
|
||||||
|
Column(
|
||||||
|
modifier = Modifier.weight(1f)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = nickName,
|
text = nickName,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
fontSize = 16.sp,
|
fontSize = 14.sp,
|
||||||
color = AppColors.text,
|
color = AppColors.text,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(2.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
when (action) {
|
Row(
|
||||||
"like" -> Text(stringResource(R.string.like_your_post), color = AppColors.text)
|
verticalAlignment = Alignment.CenterVertically
|
||||||
"favourite" -> Text(stringResource(R.string.favourite_your_post), color = AppColors.text)
|
) {
|
||||||
}
|
Text(
|
||||||
Spacer(modifier = Modifier.height(2.dp))
|
text = actionLabel,
|
||||||
Row {
|
fontSize = 14.sp,
|
||||||
Text(likeTime.timeAgo(context), fontSize = 12.sp, color = AppColors.secondaryText)
|
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(
|
CustomAsyncImage(
|
||||||
context,
|
context = context,
|
||||||
imageUrl = thumbnail,
|
imageUrl = thumbnail,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(48.dp)
|
.size(40.dp)
|
||||||
.clip(RoundedCornerShape(8.dp)),
|
.clip(RoundedCornerShape(8.dp)),
|
||||||
contentDescription = action,
|
contentDescription = action,
|
||||||
)
|
)
|
||||||
@@ -227,10 +246,11 @@ fun LikeCommentNoticeItem(
|
|||||||
val navController = LocalNavController.current
|
val navController = LocalNavController.current
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val AppColors = LocalAppTheme.current
|
val AppColors = LocalAppTheme.current
|
||||||
|
val previewPost = item.comment?.replyComment?.post ?: item.comment?.post
|
||||||
|
|
||||||
Box(
|
Column(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.padding(vertical = 16.dp)
|
.padding(vertical = 12.dp)
|
||||||
.noRippleClickable {
|
.noRippleClickable {
|
||||||
item.comment?.postId.let {
|
item.comment?.postId.let {
|
||||||
navController.navigateToPost(
|
navController.navigateToPost(
|
||||||
@@ -240,48 +260,69 @@ fun LikeCommentNoticeItem(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
) {
|
|
||||||
Row {
|
|
||||||
Column(
|
|
||||||
modifier = Modifier.weight(1f)
|
|
||||||
) {
|
) {
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
verticalAlignment = Alignment.CenterVertically
|
||||||
verticalAlignment = Alignment.Top,
|
|
||||||
) {
|
) {
|
||||||
CustomAsyncImage(
|
CustomAsyncImage(
|
||||||
imageUrl = item.user.avatar,
|
imageUrl = item.user.avatar,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.size(48.dp)
|
.size(40.dp)
|
||||||
.clip(CircleShape),
|
.clip(CircleShape),
|
||||||
contentDescription = stringResource(R.string.like_your_comment)
|
contentDescription = stringResource(R.string.like_your_comment)
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.width(12.dp))
|
Row(
|
||||||
Column(
|
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
|
.padding(start = 8.dp),
|
||||||
|
verticalAlignment = Alignment.CenterVertically
|
||||||
|
) {
|
||||||
|
Column(
|
||||||
|
modifier = Modifier.weight(1f)
|
||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = item.user.nickName,
|
text = item.user.nickName,
|
||||||
fontWeight = FontWeight.Bold,
|
fontWeight = FontWeight.Bold,
|
||||||
fontSize = 16.sp,
|
fontSize = 14.sp,
|
||||||
color = AppColors.text,
|
color = AppColors.text,
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
overflow = TextOverflow.Ellipsis
|
overflow = TextOverflow.Ellipsis
|
||||||
)
|
)
|
||||||
Spacer(modifier = Modifier.height(2.dp))
|
Spacer(modifier = Modifier.height(4.dp))
|
||||||
Text(stringResource(R.string.like_your_comment), color = AppColors.text)
|
Row(
|
||||||
Spacer(modifier = Modifier.height(2.dp))
|
verticalAlignment = Alignment.CenterVertically
|
||||||
Row {
|
) {
|
||||||
Text(
|
Text(
|
||||||
item.likeTime.timeAgo(context),
|
text = stringResource(R.string.like_your_comment),
|
||||||
fontSize = 12.sp,
|
fontSize = 14.sp,
|
||||||
|
color = AppColors.secondaryText,
|
||||||
|
modifier = Modifier.weight(1f),
|
||||||
|
maxLines = 1,
|
||||||
|
overflow = TextOverflow.Ellipsis
|
||||||
|
)
|
||||||
|
Spacer(modifier = Modifier.width(4.dp))
|
||||||
|
Text(
|
||||||
|
text = item.likeTime.timeAgo(context),
|
||||||
|
fontSize = 14.sp,
|
||||||
color = AppColors.secondaryText
|
color = AppColors.secondaryText
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Spacer(modifier = Modifier.width(4.dp))
|
||||||
|
previewPost?.let {
|
||||||
|
CustomAsyncImage(
|
||||||
|
context = context,
|
||||||
|
imageUrl = it.images[0].thumbnail,
|
||||||
|
contentDescription = "Post Thumbnail",
|
||||||
|
modifier = Modifier
|
||||||
|
.size(40.dp)
|
||||||
|
.clip(RoundedCornerShape(8.dp)),
|
||||||
|
contentScale = ContentScale.Crop
|
||||||
|
)
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.height(12.dp))
|
}
|
||||||
|
}
|
||||||
|
Spacer(modifier = Modifier.height(8.dp))
|
||||||
Row(
|
Row(
|
||||||
modifier = Modifier.padding(start = 48.dp)
|
modifier = Modifier.padding(start = 48.dp)
|
||||||
) {
|
) {
|
||||||
@@ -319,34 +360,4 @@ fun LikeCommentNoticeItem(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Spacer(modifier = Modifier.width(16.dp))
|
|
||||||
if (item.comment?.replyComment?.post != null) {
|
|
||||||
item.comment.replyComment.post.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)
|
|
||||||
.clip(RoundedCornerShape(8.dp)),
|
|
||||||
contentScale = ContentScale.Crop
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@ fun NotificationScreen() {
|
|||||||
TabSpacer()
|
TabSpacer()
|
||||||
|
|
||||||
TabItem(
|
TabItem(
|
||||||
text = stringResource(R.string.followers_upper),
|
text = stringResource(R.string.follow_upper),
|
||||||
isSelected = pagerState.currentPage == 1,
|
isSelected = pagerState.currentPage == 1,
|
||||||
onClick = {
|
onClick = {
|
||||||
scope.launch {
|
scope.launch {
|
||||||
|
|||||||
@@ -75,6 +75,7 @@
|
|||||||
<string name="bio">署名</string>
|
<string name="bio">署名</string>
|
||||||
<string name="nickname">名前</string>
|
<string name="nickname">名前</string>
|
||||||
<string name="comment">コメント</string>
|
<string name="comment">コメント</string>
|
||||||
|
<string name="comment_notice">コメント:</string>
|
||||||
<string name="order_comment_default">デフォルト</string>
|
<string name="order_comment_default">デフォルト</string>
|
||||||
<string name="order_comment_latest">最新</string>
|
<string name="order_comment_latest">最新</string>
|
||||||
<string name="order_comment_earliest">最も古い</string>
|
<string name="order_comment_earliest">最も古い</string>
|
||||||
@@ -102,6 +103,7 @@
|
|||||||
<string name="private_policy_keyword">Rave Nowのプライバシーポリシー</string>
|
<string name="private_policy_keyword">Rave Nowのプライバシーポリシー</string>
|
||||||
<string name="gallery">ギャラリー</string>
|
<string name="gallery">ギャラリー</string>
|
||||||
<string name="chat_upper">チャット</string>
|
<string name="chat_upper">チャット</string>
|
||||||
|
<string name="followed_you">フォローしました</string>
|
||||||
<string name="like_your_post">あなたの投稿にいいねしました</string>
|
<string name="like_your_post">あなたの投稿にいいねしました</string>
|
||||||
<string name="favourite_your_post">あなたの投稿をお気に入りにしました</string>
|
<string name="favourite_your_post">あなたの投稿をお気に入りにしました</string>
|
||||||
<string name="like_your_comment">あなたのコメントにいいねしました</string>
|
<string name="like_your_comment">あなたのコメントにいいねしました</string>
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
<string name="bio">个性签名</string>
|
<string name="bio">个性签名</string>
|
||||||
<string name="nickname">昵称</string>
|
<string name="nickname">昵称</string>
|
||||||
<string name="comment">评论</string>
|
<string name="comment">评论</string>
|
||||||
|
<string name="comment_notice">评论:</string>
|
||||||
<string name="order_comment_default">默认</string>
|
<string name="order_comment_default">默认</string>
|
||||||
<string name="order_comment_latest">最新</string>
|
<string name="order_comment_latest">最新</string>
|
||||||
<string name="order_comment_earliest">最早</string>
|
<string name="order_comment_earliest">最早</string>
|
||||||
@@ -107,6 +108,7 @@
|
|||||||
<string name="private_policy_keyword">用户协议</string>
|
<string name="private_policy_keyword">用户协议</string>
|
||||||
<string name="gallery">图片</string>
|
<string name="gallery">图片</string>
|
||||||
<string name="chat_upper">私信</string>
|
<string name="chat_upper">私信</string>
|
||||||
|
<string name="followed_you">关注了你</string>
|
||||||
<string name="like_your_post">喜欢了你的动态</string>
|
<string name="like_your_post">喜欢了你的动态</string>
|
||||||
<string name="favourite_your_post">收藏了你的动态</string>
|
<string name="favourite_your_post">收藏了你的动态</string>
|
||||||
<string name="like_your_comment">喜欢了你的评论</string>
|
<string name="like_your_comment">喜欢了你的评论</string>
|
||||||
|
|||||||
@@ -74,6 +74,7 @@
|
|||||||
<string name="bio">Signature</string>
|
<string name="bio">Signature</string>
|
||||||
<string name="nickname">Name</string>
|
<string name="nickname">Name</string>
|
||||||
<string name="comment">COMMENTS</string>
|
<string name="comment">COMMENTS</string>
|
||||||
|
<string name="comment_notice">commented:</string>
|
||||||
<string name="order_comment_default">Default</string>
|
<string name="order_comment_default">Default</string>
|
||||||
<string name="order_comment_latest">Latest</string>
|
<string name="order_comment_latest">Latest</string>
|
||||||
<string name="order_comment_earliest">Earliest</string>
|
<string name="order_comment_earliest">Earliest</string>
|
||||||
@@ -101,6 +102,7 @@
|
|||||||
<string name="private_policy_keyword">Rave Now’s Privacy Policy</string>
|
<string name="private_policy_keyword">Rave Now’s Privacy Policy</string>
|
||||||
<string name="gallery">Gallery</string>
|
<string name="gallery">Gallery</string>
|
||||||
<string name="chat_upper">CHAT</string>
|
<string name="chat_upper">CHAT</string>
|
||||||
|
<string name="followed_you">followed you</string>
|
||||||
<string name="like_your_post">Like your post</string>
|
<string name="like_your_post">Like your post</string>
|
||||||
<string name="favourite_your_post">Favourite your post</string>
|
<string name="favourite_your_post">Favourite your post</string>
|
||||||
<string name="like_your_comment">Like your comment</string>
|
<string name="like_your_comment">Like your comment</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user