Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

remove "add private browsing shortcut" from settings if already on home screen #5233

Closed
cadeyrn opened this issue Sep 11, 2019 · 15 comments
Closed
Assignees
Labels
Feature:PrivateBrowsing feature request 🌟 New functionality and improvements good first issue Good for newcomers Hacktoberfest Highlights issues for Hacktoberfest contributors to help us!

Comments

@cadeyrn
Copy link
Contributor

cadeyrn commented Sep 11, 2019

I don't know if it's possible at all. But after adding a private browsing shortcut to the Android home screen there is no longer a need to have the "add private browsing shortcut" item in the settings. It's a item you use once and for all but it stays permanently visible on the first level of the settings.

┆Issue is synchronized with this Jira Task

@cadeyrn cadeyrn added the feature request 🌟 New functionality and improvements label Sep 11, 2019
@NotWoods
Copy link
Contributor

NotWoods commented Sep 12, 2019

This should be possible on API 25 and above using ShortcutManager#pinnedShortcuts. We can check to see if the private browsing shortcut is present in that list.

@NotWoods NotWoods added Feature:PrivateBrowsing good first issue Good for newcomers Hacktoberfest Highlights issues for Hacktoberfest contributors to help us! labels Sep 12, 2019
@bswe
Copy link

bswe commented Sep 16, 2019

I don't think the "Add private browsing shortcut" should be thought of as a "once and for all" operation. If the user happens to delete the shortcut (either intentionally or by accident) there would be no way to add it back if the item in the settings is removed.

@NotWoods
Copy link
Contributor

NotWoods commented Sep 17, 2019

Agreed, it should only be hidden if we detect that the shortcut present on the homescreen.

@cadeyrn
Copy link
Contributor Author

cadeyrn commented Sep 17, 2019

I don't think the "Add private browsing shortcut" should be thought of as a "once and for all" operation. If the user happens to delete the shortcut (either intentionally or by accident) there would be no way to add it back if the item in the settings is removed.

Well, this is totally clear, that why I didn't mention it explicitly. ;-) Of course the menu item has to reappear if the shortcut will be removed. Otherwise my proposal wouldn't make sense. You should never get into a situation in which you can't access a feature.

@bswe
Copy link

bswe commented Sep 17, 2019

Sounds like we agree then that it isn't an "item you use once and for all".

@cadeyrn
Copy link
Contributor Author

cadeyrn commented Sep 17, 2019

Your last comment was not necessary. That's splitting hairs… It is a "item you use once and for all" - until you remove it. Of course after removing the shortcut you're in the same situation than before adding the shortcut. There is really no need for me to mention the obvious and no need for you to start a discussion about how I wrote one specific sentence - it doesn't contribute any useful to this issue…

@bswe
Copy link

bswe commented Sep 18, 2019

Clarity in describing a feature is essential and necessary, and not "splitting hairs" at all. My original comment did contribute usefully to clarifying what needed to be implemented for this issue. Your follow up comment was not necessary and sounded rather defensive and dismissive.

@bswe
Copy link

bswe commented Sep 18, 2019

Just noticed that the PrivateShortcutCreateManager method gets called within both SettingsFragment and HomeFragment, so it seems like the fix for the settings menu should be added to the home also.

I would be happy to take on implementing this feature.

@bswe
Copy link

bswe commented Sep 30, 2019 via email

@NotWoods
Copy link
Contributor

NotWoods commented Oct 1, 2019

Hi Bill, as you mentioned you can just check if the shortcut is present in API 25 and above. You can see examples of this where we have if statements checking the SDK_INT field compared to a constant version number.

@olsenme
Copy link

olsenme commented Oct 3, 2019

My name is Meagan, and I am applying for outreachy.Has anyone been assigned this issue?

@olsenme
Copy link

olsenme commented Oct 3, 2019

@cadeyrn

@NotWoods
Copy link
Contributor

NotWoods commented Oct 3, 2019

Hi Meagan, bwse has already been assigned to this issue.

Here are some other issues that we need help with:

@olsenme
Copy link

olsenme commented Oct 3, 2019

Thanks so much @NotWoods

bswe pushed a commit to bswe/fenix that referenced this issue Oct 3, 2019
…st function to determine whether a shortcut already exists (only available in API >=25).
bswe pushed a commit to bswe/fenix that referenced this issue Oct 3, 2019
…rtcutExist function to determine whether the "add private browing shortcut" item is visible in the settings menu.
bswe pushed a commit to bswe/fenix that referenced this issue Oct 3, 2019
…rtcutExist function to determine whether the "recommend private browing shortcut" dialog is displayed.
@bswe
Copy link

bswe commented Oct 3, 2019 via email

bswe pushed a commit to bswe/fenix that referenced this issue Oct 14, 2019
…st function to determine whether a shortcut already exists (only available in API >=25).
bswe pushed a commit to bswe/fenix that referenced this issue Oct 14, 2019
…rtcutExist function to determine whether the "add private browing shortcut" item is visible in the settings menu.
bswe pushed a commit to bswe/fenix that referenced this issue Oct 14, 2019
…rtcutExist function to determine whether the "recommend private browing shortcut" dialog is displayed.
bswe pushed a commit to bswe/fenix that referenced this issue Oct 14, 2019
…st function to determine whether a shortcut already exists (only available in API >=25).
bswe pushed a commit to bswe/fenix that referenced this issue Oct 14, 2019
…rtcutExist function to determine whether the "add private browing shortcut" item is visible in the settings menu.
bswe pushed a commit to bswe/fenix that referenced this issue Oct 14, 2019
…rtcutExist function to determine whether the "recommend private browing shortcut" dialog is displayed.
@bors bors bot closed this as completed in 9d3dc2b Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature:PrivateBrowsing feature request 🌟 New functionality and improvements good first issue Good for newcomers Hacktoberfest Highlights issues for Hacktoberfest contributors to help us!
Projects
None yet
Development

No branches or pull requests

4 participants