From 7f433ce4c2b9b03968838ba04735c573d5c53d65 Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 6 Jul 2026 17:33:00 +0800 Subject: [PATCH] dm-padding message --- .idea/codeStyles/Project.xml | 123 ++++++++++++++++++ .idea/codeStyles/codeStyleConfig.xml | 5 + .../login_v3/data/api/Main_API_Service.kt | 6 +- 3 files changed, 132 insertions(+), 2 deletions(-) create mode 100644 .idea/codeStyles/Project.xml create mode 100644 .idea/codeStyles/codeStyleConfig.xml diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..7643783 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,123 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/app/src/main/java/com/example/login_v3/data/api/Main_API_Service.kt b/app/src/main/java/com/example/login_v3/data/api/Main_API_Service.kt index edeed92..a3515f3 100644 --- a/app/src/main/java/com/example/login_v3/data/api/Main_API_Service.kt +++ b/app/src/main/java/com/example/login_v3/data/api/Main_API_Service.kt @@ -104,10 +104,12 @@ interface TecnologiaApi { @GET("api/dm/rooms") suspend fun getChatRooms(): Response - // Get dm message + // Get dm message (支援分頁加載) @GET("api/dm/{room_id}/messages") suspend fun getChatMessages( - @Path("room_id") roomId: String + @Path("room_id") roomId: String, + @Query("cursor") cursor: String? = null, // 🎯 新增這個:載入歷史紀錄時帶入上一次的 nextCursor + @Query("limit") limit: Int? = null // 💡 選填:如果後端有支援控制數量的話可以加上 ): Response // 標記聊天室已讀