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

Add better exception if user opens second activity #21492

Merged
merged 4 commits into from Apr 5, 2024
Merged

Add better exception if user opens second activity #21492

merged 4 commits into from Apr 5, 2024

Conversation

PureWeen
Copy link
Member

@PureWeen PureWeen commented Mar 27, 2024

Description of Change

  • Add better exception when users hit the scenario where they unknowingly launch a new activity but are reusing a window from a previous activity that hasn't been destroyed
  • Modify the templates to set LaunchMode to singleTask because they aren't overriding CreateWindow which means they are only compatibile with singleTop launchMode
     

Concern

A few people have worked around this issue by overriding OnPostCreate and ignoring the exception. This PR will break those people but realistically those users should fix the solution correctly opposed to just swallowing the exception.

Issues Fixed

Fixes #18692

- fix templates to set launch mode to singleTask
@Cybrosys
Copy link

  • Modify the templates to set LaunchMode to singleTask because they aren't overriding CreateWindow which means they are only compatibile with singleTask launchMode

singleTask -> SingleTop

Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

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

Should LaunchMode = LaunchMode.SingleTop also be set on the blazor template?

@PureWeen
Copy link
Member Author

PureWeen commented Apr 5, 2024

Should LaunchMode = LaunchMode.SingleTop also be set on the blazor template?

Good question

Let me check with @Eilon and get some thoughts
I'm not sure all the blazor scenarios and if setting that would break anything

@PureWeen PureWeen merged commit 0512748 into main Apr 5, 2024
47 checks passed
@PureWeen PureWeen deleted the fix_18692 branch April 5, 2024 18:42
@PATRICKdallat
Copy link

What release has this been merged into? @PureWeen

@PureWeen
Copy link
Member Author

What release has this been merged into? @PureWeen

8.0.20

@github-actions github-actions bot locked and limited conversation to collaborators May 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants