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(frontend): remove deleted message from store #1444

Conversation

josaphatim
Copy link
Member

Fixed showing a deleted message in next read message. And also deletes it in combined views.

@josaphatim josaphatim changed the title fix(frontend): Remove delete message from different local storage items fix(frontend): remove delete message from different local storage items Feb 11, 2025
Copy link
Member

@mercihabam mercihabam left a comment

Choose a reason for hiding this comment

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

@josaphatim you only needed to make a call to store.removeRow('uid'). I can't figure out why you needed all of the changes made.

@josaphatim
Copy link
Member Author

@mercihabam store.removeRow was the easiest solution but its does not remove the message wherever it can be found.

The message must also be removed in combined views. For you to understand you can go to everything page then memorize one message. Go to it’s respective inbox, open the message you memorized, Delete it then go back to everything page. Without Removing from combined views you Will see that the message is listed while deleted.

@mercihabam
Copy link
Member

Each page uses the same message storage class, so you can call removeRow() to each appropriate instance, and the message will be deleted. However, it's only necessary to remove it from the actual page's store because the others are updated whenever a user navigates to them.

@josaphatim
Copy link
Member Author

Screen.Recording.2025-02-17.at.10.19.58.video-converter.com.1.mov

Do you see why it is necessary to remove in all combined views ?

@mercihabam
Copy link
Member

Sorry @josaphatim, I don't see anything that contradicts what I stated earlier.

@josaphatim
Copy link
Member Author

Did you see how many seconds it took to disappear? This is not user friendly that why I deleted it because before. User can interact (click on the email) while it is already deleted and this should never happen

@mercihabam
Copy link
Member

I'm trying my best to keep you in the context.

Did you see how many seconds it took to disappear? This is not user friendly that why I deleted it because before. User can interact (click on the email) while it is already deleted and this should never happen

That does not justify all the changes you have made. store.removeRow('uid') would be sufficient.

Furthermore, I advocate for that action (removing the row from each possible page, as some pages reload noticeably slowly) not being necessary, since we have already identified that slowness as a performance issue—which I will personally address.

@kroky
Copy link
Member

kroky commented Feb 17, 2025

If @mercihabam is going to address reloading of other page's stores to fix the performance issue then let's keep this PR simple and use only teh store.removeRow('uid') method...

@josaphatim josaphatim force-pushed the message-delete-on-cached-storages branch from bc5c515 to 4ae608f Compare February 17, 2025 20:05
@josaphatim josaphatim changed the title fix(frontend): remove delete message from different local storage items fix(frontend): remove delete message from store Feb 17, 2025
@josaphatim josaphatim changed the title fix(frontend): remove delete message from store fix(frontend): remove deleted message from store Feb 17, 2025
@mercihabam
Copy link
Member

Sorry for the oversight, @josaphatim! This has already been addressed as part of the recent fixes I made. You can check it here.

@josaphatim
Copy link
Member Author

@mercihabam great! I I left a comment to the other #1443

@josaphatim josaphatim closed this Feb 17, 2025
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