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

Fixes #13870 - Showing SwipeProgressBar on Remove/Block contact #13896

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sagar0-0
Copy link
Contributor

@Sagar0-0 Sagar0-0 commented Jan 9, 2025

Closes #13870

First time contributor checklist

Contributor checklist

  • Device Realme GT NET 3T, Android 14
  • Device Infinix Hot 20 Pro, Android 14
  • Virtual device Pixel 8 Pro, Android 14
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

Call handleManualRefresh to show the progress bar. An Important check is added isRecipientPresent, so that when the user might have the dialog opened when contact is being removed or blocked, then the operation can not be performed again after progress is completed. This will prevent any unwanted exceptions or DB calls.

This isRefreshing function is already present in #13874

}));
if (isRecipientCanBeRemoved(recipient.getId())) {
disposables.add(viewModel.hideContact(recipient).subscribe(() -> {
handleManualRefresh();
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the whole PR can be reduced down to just this line. I think all we need to do is show the refresh indicator, nothing else. Which I think could be accomplished with replacing onRefresh() with handleManualRefresh()?

Copy link
Contributor Author

@Sagar0-0 Sagar0-0 Jan 10, 2025

Choose a reason for hiding this comment

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

The check i have added is for the following shown scenerio where user might try to again remove/block the Recipient while it is already in process of blocking/removing or already removed....

VID_20250110_220903_364.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Unresponsive Remove/Block New Chat Options
2 participants