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

Remember which sites were opened by which app #111

Open
user-727 opened this issue Oct 1, 2022 · 3 comments
Open

Remember which sites were opened by which app #111

user-727 opened this issue Oct 1, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@user-727
Copy link

user-727 commented Oct 1, 2022

Is your feature request related to a problem? Please describe.
I'm not sure if it's a bug, but often times when I press on a link I always want to open in a specific app (for example, I always want to open Twitter links in Firefox Focus), the suggested app in the "open with" section is another random app, like Chrome for example.

Describe the solution you'd like
Ideally the app would remember which sites were opened by which app and suggest that one in the "open with" section by default, instead of having to click the arrow and selecting the right app which adds unnecessary steps.

Describe alternatives you've considered
I have thought about other solutions that would solve this issue, but it seems like they've already been suggested as feature requests already: #21 & #47. In my opinion, both of these feature requests would be really beneficial and I would personally love to see them implemented someday!

Additional context
Thanks for making this app, I use it dozens of times per day and it's become an absolute necessity for my Android experience!

@user-727 user-727 added the enhancement New feature or request label Oct 1, 2022
@TrianguloY
Copy link
Owner

TrianguloY commented Oct 1, 2022

TLDR: try selecting the app at least 4 times, it should then be suggested over the other not-selected ones.


The open module remembers the selected apps, although the logic behind it is a bit complex. In fact it was changed in the latest version, here is what it currently does:

Internally there is a database for pair of apps and their preference as a 0-3 value. For example imagine a database that says "Firefox is 3-preferred over opera".

When you open a link, the list of valid apps is retrieved from android (which android says its sorted by the user preference, but I doubt it). Then that list is ordered with the paired preferences. For example if the list was chrome, opera and Firefox (in that order) then it would be sorted as chrome > Firefox > opera.

When you choose an app, that app is marked as preferred over the rest, for example if you choose Firefox, the database would be updated to "Firefox is 3-preferred over opera" (already the max) and "Firefox is 1-preferred over chrome" (new entry).
Now, in the same situation as before, the list would be sorted as Firefox > chrome > opera.

@user-727
Copy link
Author

user-727 commented Oct 1, 2022

I see, but that behavior is global, meaning the same for every site, correct? Because if I do like you say and open the same link three times with the same app (let's say Twitter with Firefox) everything works fine and the fourth time it does indeed suggest me to open it in Firefox. But, when I press on any other link (let's say GitHub or Youtube for example) the suggested app is still Firefox whereas it was Chrome before.
My suggestion would be that this list of sorted apps you speak of should be independant for each site instead of being a global list for every link opened. It would also be cool if there was a place in the app where you could see those lists for each site and manually modify their order (instead of opening the same link a bunch of times with the same app)

@TrianguloY
Copy link
Owner

Yes, it's global. In fact originally I made the change to be site-specific, but that meant that all sites need to be opened at least once for it to be "correct". My device keeps saying that chrome is preferred over Firefox, and I only use Firefox, so for me it was a pain to change it every time (the opposite of what it happens to you) and so I reverted that change and kept it global.

I'm not sure what the best "algorithm" is for this module, maybe a combination of a global default with site specific, not sure. In any case I'm open to suggestions, I'll keep this issue to record them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants