-
-
Notifications
You must be signed in to change notification settings - Fork 560
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 archive conversation issues #732
Conversation
When a chat is archived the selection is switched to the next one. Also added some fixes using `elementReady()` since some elements are requested before page is loaded.
Also fixed leaving group conversations issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for the PR! I've added feedback about stuff that's I've noticed is broken or could be broken for other users.
Non-async functions that call async functions are now turned to async.
Fixed that check for chat type via chat options menu. Also explained the process in the comment.
Reverting to use of elementReady for getting element.
@CvX here are updates. This should be it. |
I like the idea of making the |
showSettingsMenu is used in a cuple of places and in one place it needs to wait for element to be created to show the menu. In that place so far we've been using a custom function elementReady instead of document.querySelector. Now showSettingsMenu is made async so it can now use elementReady.
Here it is 😃 |
Here's a work around. It's ugly, it's not foolproof but it works.
Merged the branch with CvX's arvhice-fix branch that contains new mechanism for querying menus and clicking on menu items. Also used that new mechanism for openArchiveModal function. Great work by @CvX.
Since that’s what this function does. There’s no modal.
That argument is 1-based, it later gets converted to a 0-based index.
Prevents errors in situations where conversation list is replaced with another view.
I've cleaned up the code a little bit. Please take a look, I want to be sure everything is as expected. 😉 |
Looks good 👌🏻. I've just tested it and found out that actually delete chat option behaves just like archive option used to, gets removed from the list and leaves the chat panel empty. Should we add the same feature (open next conversation) to delete chat option while were here? |
Oh, yeah. 😅That would be great! 😃 |
Function `openDeleteModal` was renamed to `deleteSelectedConverastion` and is now after delete selecting next conversation so chat panel wont be empty.
Co-authored-by: Jarek Radosz <[email protected]>
Fixed archive conversation issues. Now when a conversation is archived, it automatically switches to the next conversation so there wont be an empty display. Also with this PR fixed the issue with archiving group conversations.
Closes: #590
Closes: #591