Skip to content

Commit

Permalink
Fix WhatsApp count
Browse files Browse the repository at this point in the history
  • Loading branch information
victorbnl committed Jul 18, 2023
1 parent e2f889c commit 620d637
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions recipes/whatsapp/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ module.exports = Ferdium => {
query.onsuccess = (event) => {
for (const chat of event.target.result) {
if (chat.unreadCount > 0) {
if (chat.muteExpiration === 0 && chat.archive === false) {
unreadCount += chat.unreadCount;
} else {
if (chat.muteExpiration > 0 || chat.isAutoMuted) {
unreadMutedCount += chat.unreadCount;
} else {
unreadCount += chat.unreadCount;
}
}
}
Expand Down

0 comments on commit 620d637

Please sign in to comment.