更新消息功能

This commit is contained in:
2024-08-20 19:48:12 +08:00
parent 6137e1c3b5
commit 5228fde035
18 changed files with 1077 additions and 259 deletions

View File

@@ -9,6 +9,7 @@ import com.google.gson.Gson
import com.google.gson.GsonBuilder
import io.github.serpro69.kfaker.faker
import java.io.File
import java.util.Calendar
object TestDatabase {
var momentData = emptyList<MomentEntity>()
@@ -90,14 +91,16 @@ object TestDatabase {
var newCommentEntity = CommentEntity(
name = commentPerson.nickName,
comment = "this is comment ${commentIdCounter}",
date = "2023-02-02 11:23",
date = Calendar.getInstance().time,
likes = 0,
replies = emptyList(),
postId = momentIdCounter,
avatar = commentPerson.avatar,
author = commentPerson.id.toLong(),
id = commentIdCounter,
liked = false
liked = false,
unread = false,
post = null
)
// generate like comment list
for (likeIdx in 0..faker.random.nextInt(0, 5)) {