Skip to content

Commit dd54b1d

Browse files
committed
1.[ADD]:add msgstatus setup code in stackpage
1 parent 4f52dfd commit dd54b1d

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

chatting-client/chattingstackpage.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,18 @@ void ChattingStackPage::setupBubbleFrameOnItem(
182182
} else if (type == MsgType::FILE) {
183183
}
184184

185-
if (bubble) {
186-
item->setupBubbleWidget(bubble);
187-
ui->chatting_record->pushBackItem(item);
185+
if (!bubble) return;
186+
item->setupBubbleWidget(bubble);
187+
188+
if(value->isOnLocal()){
189+
item->setupMsgStatus(MessageStatus::UNSENT);
190+
}
191+
else{
192+
/*maybe more logic in the future*/
193+
item->setupMsgStatus(MessageStatus::SENT);
188194
}
195+
196+
ui->chatting_record->pushBackItem(item);
189197
}
190198

191199
void ChattingStackPage::distribute(std::shared_ptr<ChattingBaseType> value) {

0 commit comments

Comments
 (0)