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

Feature: Allow users to undo post deletions #298

Merged
merged 11 commits into from
Jan 22, 2025

Conversation

julian-wls
Copy link
Contributor

@julian-wls julian-wls commented Jan 15, 2025

Problem Description

This PR adds the undo delete button known from the web app to the Android app. It is shown 6 seconds to give the user time to undo the post deletion.

Changes

Two lists have been added to the ConversationViewModel, to keep track on posts marked as to be deleted and a list that holds ongoing deletion jobs.

Steps for testing

  1. Go to the chat
  2. Long-click on any post and click Delete
  3. Verify that the undo button shows up
  4. Click on the undo button and verify the post does not get deleted
  5. Optional: Delete multiple posts at the same time and check the undo button is available for each post and reverts the correct post after clicking.

Screenshots

recording.mp4

@julian-wls julian-wls self-assigned this Jan 15, 2025
@julian-wls julian-wls added the ready for review This PR can be reviewed label Jan 16, 2025
@julian-wls julian-wls marked this pull request as ready for review January 16, 2025 10:00
Copy link
Collaborator

@FelberMartin FelberMartin left a comment

Choose a reason for hiding this comment

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

Cool change, works as expected. Also tested in offline mode, work as well.

Copy link
Contributor

@eylulnc eylulnc left a comment

Choose a reason for hiding this comment

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

Look really good! ☺️ Works as expected. After Martin's feedback points it should be good to go.

Copy link
Collaborator

@FelberMartin FelberMartin left a comment

Choose a reason for hiding this comment

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

Lgtm now!

@FelberMartin FelberMartin added ready to merge This PR can be merged and removed ready for review This PR can be reviewed labels Jan 17, 2025
@FelberMartin FelberMartin changed the title Communication: Allow users to undo post deletions Feature: Allow users to undo post deletions Jan 17, 2025
@FelberMartin FelberMartin merged commit 767de53 into develop Jan 22, 2025
5 checks passed
@FelberMartin FelberMartin deleted the feature/communication/undo-delete branch January 22, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge This PR can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants