show no available accounts when all accounts are hidden

This commit is contained in:
MaysWind
2024-07-24 23:30:53 +08:00
parent 84f7eab95d
commit 1f63aa8cdf
3 changed files with 91 additions and 80 deletions
+5 -9
View File
@@ -148,14 +148,12 @@ export function getCategorizedAccountsWithVisibleCount(categorizedAccounts) {
for (let j = 0; j < allAccounts.length; j++) {
const account = allAccounts[j];
if (account.hidden) {
continue;
}
if (!account.hidden) {
allVisibleAccountCount++;
allVisibleAccountCount++;
if (firstVisibleAccountIndex === -1) {
firstVisibleAccountIndex = j;
if (firstVisibleAccountIndex === -1) {
firstVisibleAccountIndex = j;
}
}
if (account.type === accountConstants.allAccountTypes.MultiSubAccounts && account.subAccounts) {
@@ -199,8 +197,6 @@ export function getCategorizedAccountsWithVisibleCount(categorizedAccounts) {
}
}
console.log(ret)
return ret;
}