placeholders looking good and sync page sizes with android

This commit is contained in:
Diogo
2024-11-06 15:25:10 +00:00
parent 9b6365ca88
commit 9155a2f02a
4 changed files with 11 additions and 9 deletions
+4 -4
View File
@@ -2665,13 +2665,13 @@ public struct ChatItem: Identifiable, Decodable, Hashable {
return item
}
public static func placeholder(_ idx: Int) -> ChatItem {
public static func placeholder(idx: Int, text: String, chatDir: CIDirection) -> ChatItem {
var item = ChatItem(
chatDir: CIDirection.directSnd,
chatDir: chatDir,
meta: CIMeta(
itemId: Int64(idx * -10),
itemTs: .now,
itemText: "",
itemText: text,
itemStatus: .rcvRead,
createdAt: .now,
updatedAt: .now,
@@ -2681,7 +2681,7 @@ public struct ChatItem: Identifiable, Decodable, Hashable {
deletable: false,
editable: false
),
content: .sndMsgContent(msgContent: .text("")),
content: .sndMsgContent(msgContent: .text(text)),
quotedItem: nil,
file: nil
)