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 Hide app icon option #2462

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

ILoveOpenSourceApplications
Copy link

@ILoveOpenSourceApplications ILoveOpenSourceApplications commented Jul 30, 2024

Adds an option to hide icon from launcher.

Resolves #2263, resolves #2266 as well as resolves #2361.

Credits: @rufusin

@ILoveOpenSourceApplications ILoveOpenSourceApplications changed the title Add Hide icon from launcher option Add Hide app icon option Jul 30, 2024
@ale5000-git
Copy link
Member

The icon should be enabled by default.

These two should seems to do the opposite:
CheckIn.HIDE_APP_ICON -> getSettingsBoolean(key, true)
android:enabled="false"

@ale5000-git
Copy link
Member

ale5000-git commented Jul 30, 2024

Also in my opinion the variable name seems a bit strange:
private fun updateHideAppIcon(enabled: Boolean)

Personally I would choose
private fun updateHideAppIcon(hide: Boolean)
or
private fun updateShowAppIcon(enabled: Boolean)

@ale5000-git
Copy link
Member

ale5000-git commented Jul 31, 2024

The icon should be enabled by default.

android:defaultValue="false"/>

The option in microG settings is disabled so the icon should be enabled by default, but you disable the icon in reality here:
https://github.com/microg/GmsCore/pull/2462/files#diff-d629a5125b2f479f4916b4b963c3ed5bc5b8c8e79951dfb805bc1fa4a7384624R597-R605

        <activity
            android:name="org.microg.gms.ui.MainSettingsActivity"
            android:enabled="false"

Edit: Now that I read better, here you don't disable the icon but the MainSettingsActivity so you actually break the microG settings.
This one mustn't be disabled in any case.

This shouldn't be touched => org.microg.gms.ui.MainSettingsActivity
This can be disabled (but not by default) => org.microg.gms.ui.SettingsActivity

@ale5000-git
Copy link
Member

ale5000-git commented Jul 31, 2024

Also in my opinion the variable name seems a bit strange: private fun updateHideAppIcon(enabled: Boolean)

May I ask what the variable does here so that I could understand which one from the below two would make sense?

This is just personal opinion but in this case:
updateHideAppIcon(enabled=true)
when enabled = true, the icon is hidden so not enabled.

instead with this:
updateHideAppIcon(hide=true)
when hide = true, the icon is hidden so not enabled.

So actually it is the same in practice but I think the first is just more confusing but it is still personal preference.

@mar-v-in What do you think?

@ILoveOpenSourceApplications
Copy link
Author

ILoveOpenSourceApplications commented Aug 27, 2024

@mar-v-in & @ale5000-git, a gentle ping for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants