Add files via upload

This commit is contained in:
Cola-Echo
2026-01-02 02:48:58 +08:00
committed by GitHub
parent 8595a7c48d
commit 4a097a613b
2 changed files with 7 additions and 0 deletions

View File

@@ -2883,13 +2883,18 @@ function bindEvents() {
}
function init() {
console.log('[可乐] init() 开始');
loadSettings();
console.log('[可乐] loadSettings 调用完成,开始 getSettings');
const settings = getSettings();
console.log('[可乐] getSettings 完成,开始 seedDefaultUserPersonaFromST');
if (seedDefaultUserPersonaFromST(settings)) {
requestSave();
}
console.log('[可乐] seedDefaultUserPersonaFromST 完成,开始 generatePhoneHTML');
const phoneHTML = generatePhoneHTML();
console.log('[可乐] generatePhoneHTML 完成');
document.body.insertAdjacentHTML('beforeend', phoneHTML);
setupPhoneAutoCentering();

2
ui.js
View File

@@ -180,7 +180,9 @@ export function generateChatList() {
// 生成单聊列表项
function generateContactChatItem(contact) {
if (!contact) return '';
const lastMsg = contact.lastMsg;
if (!lastMsg) return '';
let preview = '';
if (lastMsg.type === 'voice' || lastMsg.isVoice) {
preview = '[语音]';