-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
base: main
Are you sure you want to change the base?
Conversation
})); | ||
if (isRecipientCanBeRemoved(recipient.getId())) { | ||
disposables.add(viewModel.hideContact(recipient).subscribe(() -> { | ||
handleManualRefresh(); |
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.
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()?
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.
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
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.
I understand, but I don't think all of the extra code justifies the result, which is just saving an extra refresh call.
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.
Alright, I will make the required changes
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.
I have made the required changes.
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.
Thanks! Will go in 7.31
Closes #13870
First time contributor checklist
Contributor checklist
Fixes #1234
syntaxDescription
Call
handleManualRefresh
to show the progress bar. An Important check is addedisRecipientPresent
, 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