Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WhatsApp count #390

Merged
merged 2 commits into from
Jul 18, 2023
Merged

Fix WhatsApp count #390

merged 2 commits into from
Jul 18, 2023

Conversation

victorbnl
Copy link
Contributor

Pre-flight Checklist

Please ensure you've completed all of the following.

Description of Change

See ferdium/ferdium-app#1182 (comment)

Copy link
Contributor

@vraravam vraravam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please bump the version in the package.json specific to this recipe

@victorbnl
Copy link
Contributor Author

I’m changing the fix though, as I figured out another issue whilst testing (chat.muteExpiration) doesn’t always exist. Then I’ll bump the version number

@victorbnl
Copy link
Contributor Author

Finally I will stick to chat.archive, it’s not outdated, it just doesn’t exist on some chats (as with chat.muteExpiration for that matter), and chat.isAutoMuted doesn’t tell the archived state of a chat. However I changed the condition so it won’t be a problem if one is undefined.

@vraravam vraravam merged commit fd169b7 into ferdium:main Jul 18, 2023
2 checks passed
@AvremelM
Copy link

Finally I will stick to chat.archive, it’s not outdated, it just doesn’t exist on some chats (as with chat.muteExpiration for that matter), and chat.isAutoMuted doesn’t tell the archived state of a chat. However I changed the condition so it won’t be a problem if one is undefined.

@victorbnl
What happened to this? The code isn't using chat.archive anymore, and I have 6000+ unreads now 😂

@victorbnl
Copy link
Contributor Author

victorbnl commented Aug 25, 2023

That’s a lot! Could you go to the service developer console (by pressing Alt+Ctrl+Shift+I) into the “Application” tab, then expand “IndexedDB”, then “model-storage”, then “chat”, and look at some entries to see if they have muteExpiration and isAutoMuted attributes and check their values? An example of an entry that is archived but meets the following condition would be helpful: chat.muteExpiration > 0 || chat.isAutoMuted.

@AvremelM
Copy link

AvremelM commented Aug 29, 2023

@victorbnl
No problem.
I'm looking at some of the muted/archive groups I have and I see

{
  archive: true,
  //...
  isAutoMuted: false,
  muteExpiration: -1,
  //...
  unreadCount: 3123,
}

I think the muteExpiration: -1 is "infinite", i.e. when you tell it to never turn back on.
Perhaps the condition should be chat.muteExpiration !== 0

@victorbnl
Copy link
Contributor Author

Yes, that has been dealt with in: #408 (recipe version 3.5.2).

@AvremelM
Copy link

Oh, perfect, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants