Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

fix(settings): single choice prefs not being dismissed when clicking … #1311

Merged
merged 3 commits into from
Sep 14, 2023
Merged

Conversation

Rafael2616
Copy link
Contributor

…outside the dialog

Some preferences that do not have an "ok" or "cancel" button forced us to click on the choice again so that the card disappeared

Now the following preferences are dismissible:

  • UI Mode (Theme)
  • Tab Size
  • Empty elements behavior

…outside the dialog

fix(settings): Single choice prefs not being dismissed when clicking …
…outside the dialog

Some preferences that do not have an "ok" or "cancel" button forced us to click on the choice again so that the card disappeared

Now the following preferences are dismissible:
- UI Mode (Theme)
- Tab Size
- Empty elements behavior
Copy link
Member

@itsaky itsaky left a comment

Choose a reason for hiding this comment

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

Instead of overriding onConfigureDialog and directly modifying the dialog properties, override the dialogCancellable property and set it to true.

@Rafael2616
Copy link
Contributor Author

Ok, I thought about that, but I thought the "false" behavior by default was used for other things. I will correct it soon

@itsaky
Copy link
Member

itsaky commented Sep 14, 2023

Ok, I thought about that, but I thought the "false" behavior by default was used for other things. I will correct it soon

You have to "override" the property in the respective classes. Modification in DialogPreference is not required.

@Rafael2616
Copy link
Contributor Author

I made the changes, see if it was supposed to stay like this

@itsaky itsaky merged commit 0050a5d into AndroidIDEOfficial:dev Sep 14, 2023
itsaky pushed a commit that referenced this pull request Nov 9, 2023
…outside dialog (#1311)

Some preferences that do not have an "Ok" or "cancel" button forced us to click on the choice again so that the card disappeared

Now the following preferences are dismissable:
- UI Mode (Theme)
- Tab Size
- Empty elements behavior
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants