mirror of
https://github.com/Cola-Echo/Cola.git
synced 2026-06-05 23:25:51 +00:00
Add files via upload
This commit is contained in:
5
main.js
5
main.js
@@ -2883,13 +2883,18 @@ function bindEvents() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
console.log('[可乐] init() 开始');
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
console.log('[可乐] loadSettings 调用完成,开始 getSettings');
|
||||||
const settings = getSettings();
|
const settings = getSettings();
|
||||||
|
console.log('[可乐] getSettings 完成,开始 seedDefaultUserPersonaFromST');
|
||||||
if (seedDefaultUserPersonaFromST(settings)) {
|
if (seedDefaultUserPersonaFromST(settings)) {
|
||||||
requestSave();
|
requestSave();
|
||||||
}
|
}
|
||||||
|
console.log('[可乐] seedDefaultUserPersonaFromST 完成,开始 generatePhoneHTML');
|
||||||
|
|
||||||
const phoneHTML = generatePhoneHTML();
|
const phoneHTML = generatePhoneHTML();
|
||||||
|
console.log('[可乐] generatePhoneHTML 完成');
|
||||||
document.body.insertAdjacentHTML('beforeend', phoneHTML);
|
document.body.insertAdjacentHTML('beforeend', phoneHTML);
|
||||||
|
|
||||||
setupPhoneAutoCentering();
|
setupPhoneAutoCentering();
|
||||||
|
|||||||
2
ui.js
2
ui.js
@@ -180,7 +180,9 @@ export function generateChatList() {
|
|||||||
|
|
||||||
// 生成单聊列表项
|
// 生成单聊列表项
|
||||||
function generateContactChatItem(contact) {
|
function generateContactChatItem(contact) {
|
||||||
|
if (!contact) return '';
|
||||||
const lastMsg = contact.lastMsg;
|
const lastMsg = contact.lastMsg;
|
||||||
|
if (!lastMsg) return '';
|
||||||
let preview = '';
|
let preview = '';
|
||||||
if (lastMsg.type === 'voice' || lastMsg.isVoice) {
|
if (lastMsg.type === 'voice' || lastMsg.isVoice) {
|
||||||
preview = '[语音]';
|
preview = '[语音]';
|
||||||
|
|||||||
Reference in New Issue
Block a user