-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
Handle read events to the same server from different clients #997
Open
mkp6781
wants to merge
3
commits into
zulip:main
Choose a base branch
from
mkp6781:handle_read_events
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add 'unread_msgs' attribute in index to store all data pertaining to unread messages obtained from initial_data. Modify classify_unread_counts to return this unread_msgs data structure. Tests amended.
Entries are added to unread message datastructure when new messsages are added, so that unread count can be updated(Here, self pms are not included). Removed FIXME comments in `_set_count_in_view`. * `sender_id` key is present in all formats of messages. We can use it's value for verifying if it's a self pm before updating button's count. * `unread_counts['unread_topics']` is already being updated in `_set_count_in_model`. Tests added.
Use index['unread_msgs'] to update count in `model` and to further change button count in UI. Later on when adding support for marking a particular stream or topic messages as read, index['messages'] may not be effective as it only stores a few messages. This new data structure may prove useful to have access to all concerned message ids. Tests amended.
bbecd9d
to
1411a1d
Compare
@zulipbot add "PR needs review" |
Heads up @mkp6781, we just merged some commits that conflict with the changes your made in this pull request! You can review this repository's recent commits to see where the conflicts occur. Please rebase your feature branch against the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
has conflicts
high priority
should be done as soon as possible
PR needs review
PR requires feedback to proceed
size: XL
[Automatic label added by zulipbot]
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Taking forward @kaustubh-nair 's work on #535.
I have added a commit to update
set_count
function to use index[unread_msgs
] along with necessary changes to make sure that the application does not crash.