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

Hotfix: suggestion selection crash #469

Merged
merged 1 commit into from
Mar 14, 2022

Conversation

mallexxx
Copy link
Collaborator

@mallexxx mallexxx commented Mar 14, 2022

Task/Issue URL: https://app.asana.com/0/inbox/1199237043628108/1201958708460468/1201958708499920
Tech Design URL:
CC:

Description:
Fixes crash when selecting shorter suggestion:

Seems that touchbar doesn't get the updated string value before "willChangeSelection" is called and using an old string range value

in the reproduction steps below it got {0, 27} range whereas the real range is {0, 23}

So the async call is not for the threads issue but to get the touchbar updated before we call redraw

Steps to test this PR:
0. Activate Xcode->Window->Touch Bar->Show Touch Bar

  1. Enter "a" text into search field
  2. Select down till a long item switching to a short one (aerlingus.com/... -> aib, see screenshot; Erase and re-enter "a" until the needed result appears)
  3. Validate there's no crash

Testing checklist:

  • Test with Release configuration

Internal references:

Software Engineering Expectations
Technical Design Template
When ready for review, remember to post the PR in MM

@mallexxx
Copy link
Collaborator Author

Screenshot 2022-03-14 at 15 42 02

@brindy brindy self-requested a review March 14, 2022 12:02
@brindy brindy self-assigned this Mar 14, 2022
Copy link
Contributor

@brindy brindy left a comment

Choose a reason for hiding this comment

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

LGTM! 🥇

@brindy brindy assigned mallexxx and unassigned brindy Mar 14, 2022
@mallexxx mallexxx changed the base branch from main to release/0.20.1 March 14, 2022 13:23
@mallexxx mallexxx merged commit 6f1fea1 into release/0.20.1 Mar 14, 2022
@mallexxx mallexxx deleted the alex/hotfix/fix-suggestion-crash branch March 14, 2022 13:23
samsymons added a commit that referenced this pull request Mar 16, 2022
* develop:
  fix launch link when no windows are open (#470)
  Version 0.20.1
  Update storyboards to use correct color names. (#468)
  Fix suggestion selection crash (#469)
  Version 0.20.0
  Dev tools visibility fix (#457)
  Fix BrowserTabViewController leakage (#463)
  Remove the upgrade logic. (#460)
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.

2 participants