修复切换邮箱自动刷新错乱

This commit is contained in:
eoao
2025-11-23 13:25:41 +08:00
parent c61bda1828
commit 70923fee59
4 changed files with 38 additions and 15 deletions

View File

@@ -447,14 +447,17 @@ function addItem(email) {
if (props.timeSort) {
if (noLoading.value) {
emailList.push(email)
latestEmail.value = email
total.value++
} else {
total.value++
}
if (email.emailId > latestEmail.value.emailId) {
latestEmail.value = email
}
total.value++
return;
}
const index = emailList.findIndex(item => item.emailId < email.emailId)
if (index !== -1) {
@@ -465,6 +468,10 @@ function addItem(email) {
}
}
if (email.emailId > latestEmail.value.emailId) {
latestEmail.value = email
}
total.value++
}