Add files via upload

This commit is contained in:
Cola-Echo
2025-12-26 23:26:02 +08:00
committed by GitHub
parent 475707f104
commit 57ac982e84
15 changed files with 1088 additions and 63 deletions

View File

@@ -349,8 +349,8 @@ export function checkGiftDelivery(contact) {
const currentCount = contact.chatHistory?.length || 0;
for (const gift of contact.pendingGifts) {
// 如果正在使用中,跳过
if (gift.isUsing) continue;
// 如果正在使用中或已完成,跳过
if (gift.isUsing || gift.completed) continue;
// 首次送达检测
if (!gift.isDelivered && currentCount >= gift.startMessageCount + 25) {
@@ -415,6 +415,10 @@ export function showGiftArrivalModal(gift, contact) {
yesBtn.removeEventListener('click', handleYes);
noBtn.removeEventListener('click', handleNo);
// 标记礼物为已完成,防止重复触发弹窗
gift.completed = true;
requestSave();
// 打开玩具控制界面
const { showToyControlPage } = await import('./toy-control.js');
showToyControlPage(gift, contact, currentChatIndex);