修复切换邮箱自动刷新错乱
This commit is contained in:
@@ -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++
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user