fix: 修复微信ui在消息数量超过上限后,气泡位置向上偏移的问题 (#418)

This commit is contained in:
Lucinhu
2025-03-27 20:02:45 +08:00
committed by GitHub
parent 7ac252637d
commit 8a0bb68c33

View File

@@ -530,6 +530,9 @@ void LcdDisplay::SetChatMessage(const char* role, const char* content) {
if (oldest_msg != nullptr) { if (oldest_msg != nullptr) {
lv_obj_del(oldest_msg); lv_obj_del(oldest_msg);
msg_count--; msg_count--;
// 删除最早的消息会导致所有气泡整体往上移
// 所以需要重新滚动到当前消息气泡位置
lv_obj_scroll_to_view_recursive(msg_bubble, LV_ANIM_ON);
}else{ }else{
break; break;
} }