消息列表

This commit is contained in:
2026-05-27 17:44:37 +08:00
parent 97a0cdc14f
commit c5043e4b94
20 changed files with 783 additions and 82 deletions

View File

@@ -267,17 +267,7 @@ class HomeMenuFragment : Fragment() {
try {
val response = RetrofitNetwork.getNetworkService().getMessage()
withContext(Dispatchers.Main) {
if (response.code == 200 && response.data != null) {
val messageGroups = response.data as List<*>
var unreadCount = 0
messageGroups.forEach { group ->
if (group is Map<*, *>) {
val list = group["list"] as? List<*>
list?.let { unreadCount += it.size }
}
}
MessageStatusManager.setUnreadCount(unreadCount)
}
}
} catch (e: Exception) {
e.printStackTrace()