Skip to content

Fix photo suggestion stops working after the first try#2068

Open
shulmnn wants to merge 1 commit intoTelegramMessenger:masterfrom
shulmnn:fix/issue-2067-avatar-checkmark-cancel
Open

Fix photo suggestion stops working after the first try#2068
shulmnn wants to merge 1 commit intoTelegramMessenger:masterfrom
shulmnn:fix/issue-2067-avatar-checkmark-cancel

Conversation

@shulmnn
Copy link

@shulmnn shulmnn commented Mar 25, 2026

Summary

  • Fix checkmark button in avatar suggest/set flow becoming permanently
    non-functional after dismissing the confirmation modal
  • Defer media editor destruction (stop()/invalidate()) until the user
    actually confirms, keeping the editor alive on cancel
  • Add cancel callback to reset completion state when modal is dismissed

Fixes #2067

Test plan

  • Open Telegram App
  • Go to chat with a person in your contacts
  • Click on the person's name
  • Click Edit
  • Press "Suggest Photo for "Contact Name"" or "Change Photo for "Contact Name""
  • Choose any photo
  • Press the checkmark on the bottom right corner
  • Click "Cancel" on the modal
  • Click checkmark again
  • Click "Suggest" or "Set" depending on your action
  • Verify normal behaviour

…ion modal

Defer media editor stop/invalidate until user confirms, and reset
didComplete flag on modal dismissal so the checkmark remains functional.

Fixes TelegramMessenger#2067
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

Photo suggestion stops working after the first try

2 participants