dm-9
This commit is contained in:
parent
0cbd1b67b3
commit
210bccb4ea
1 changed files with 11 additions and 2 deletions
|
|
@ -71,6 +71,7 @@ import androidx.navigation.compose.rememberNavController
|
|||
import coil.compose.AsyncImage
|
||||
import com.example.login_v3.data.api.api_class.ChatRoom
|
||||
import com.example.login_v3.data.api.api_class.fullContactAvatarUrl
|
||||
import com.example.login_v3.home.Message.UI.Detail.MessageMessaging
|
||||
import com.example.login_v3.home.Message.UI.Detail.Message_add_contact
|
||||
import com.example.login_v3.home.Message.UI.Detail.Message_contact_list
|
||||
import com.example.login_v3.home.Message.UI.Detail.Scan_QRcode
|
||||
|
|
@ -83,6 +84,7 @@ sealed class Screen(val route: String) {
|
|||
object CreateContact : Screen("create_contact")
|
||||
object FriendsList : Screen("friends_list")
|
||||
object ScanQRcode : Screen("scan_QRcode")
|
||||
object MessageMessaging : Screen("Message_Messaging")
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
|
@ -145,6 +147,11 @@ fun Tg_Message(
|
|||
composable(Screen.ScanQRcode.route) {
|
||||
Scan_QRcode(navController)
|
||||
}
|
||||
|
||||
//Message detail
|
||||
composable(Screen.MessageMessaging.route) {
|
||||
MessageMessaging(navController)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -273,7 +280,10 @@ fun Loaded_Tg_Message(
|
|||
) { room ->
|
||||
RoomItem(
|
||||
room = room,
|
||||
onClick = onRoomClick
|
||||
onClick = {
|
||||
onRoomClick(room.roomId) // 執行原本的點擊邏輯 (依你的定義傳入對應的 String)
|
||||
navController.navigate(Screen.MessageMessaging.route) // 執行導頁
|
||||
}
|
||||
)
|
||||
Spacer(modifier = Modifier.height(6.dp))
|
||||
}
|
||||
|
|
@ -400,7 +410,6 @@ fun RoomItem(
|
|||
}
|
||||
|
||||
|
||||
|
||||
//online status
|
||||
val partner = room.partner // 先從 room 取得 partner
|
||||
if (partner != null) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue