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 invites count #1645

Merged
merged 2 commits into from
Nov 30, 2022
Merged

Fix invites count #1645

merged 2 commits into from
Nov 30, 2022

Conversation

alfogrillo
Copy link
Contributor

Description

This PR refactor the count logic for invites making it coherent with unread messages and mentions count.

Currently for mentions the same event is counted both in:

  • *count
  • *HighlightedCount

Conversely Invites are counted just in:

  • *HighlightedCount

This break the invariant:
*count >= *HighlightedCount
bringing inconsistencies in the client.

After this PR invites are counted both as highlighted and in the general count as well.

Related PR

element-hq/element-ios#7088

@codecov
Copy link

codecov bot commented Nov 28, 2022

Codecov Report

Base: 25.29% // Head: 25.35% // Increases project coverage by +0.06% 🎉

Coverage data is based on head (955a853) compared to base (084a06a).
Patch coverage: 50.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1645      +/-   ##
===========================================
+ Coverage    25.29%   25.35%   +0.06%     
===========================================
  Files          587      587              
  Lines        92786    92786              
  Branches     40234    40244      +10     
===========================================
+ Hits         23471    23527      +56     
+ Misses       68533    68481      -52     
+ Partials       782      778       -4     
Impacted Files Coverage Δ
MatrixSDK/Space/MXSpaceNotificationCounter.swift 69.56% <50.00%> (-0.25%) ⬇️
MatrixSDK/MXSession.m 39.74% <0.00%> (+0.08%) ⬆️
MatrixSDK/MXRestClient.m 27.51% <0.00%> (+0.11%) ⬆️
...Data/Store/MXRealmCryptoStore/MXRealmCryptoStore.m 71.53% <0.00%> (+0.22%) ⬆️
MatrixSDK/Crypto/MXCrypto.m 65.28% <0.00%> (+1.15%) ⬆️
MatrixSDK/Crypto/KeyBackup/MXKeyBackup.m 62.24% <0.00%> (+1.27%) ⬆️
...yncResponseFileStore/MXSyncResponseFileStore.swift 75.25% <0.00%> (+2.29%) ⬆️
...ils/Categories/FileManager+AppGroupContainer.swift 100.00% <0.00%> (+16.66%) ⬆️
MatrixSDK/JSONModels/MXJSONModel.h 90.62% <0.00%> (+18.75%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

Nice catch, LGTM 👍

@alfogrillo alfogrillo merged commit 8ebd8a7 into develop Nov 30, 2022
@alfogrillo alfogrillo deleted the alfogrillo/invites_count branch November 30, 2022 09:21
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.

2 participants