news-android icon indicating copy to clipboard operation
news-android copied to clipboard

When "skip detail view" is active, articles are not opened on tap

Open codeling opened this issue 2 years ago • 8 comments

Since very recently - probably since updating to 0.9.9.82:

In the settings, I have "skip detail view and open articles in browser" (self-translated - my app in german shows "Detailansicht überspringen und Artikel in Browser öffnen") activated.

Before the problem started, when I tapped on an article, it would open immediately in a browser.

Now, when I tap an article, no browser comes to the foreground and shows the article; only the tapped item gets marked as read, but nothing else happens. When I deactivate abovementioned setting, on first tap, a detail view opens, and on tapping the item title in that detail view, the associated article opens in the browser (as it happened before, immediately on tapping the item in the list, as I would like it to be).

Android Version: 13 (on a Fairphone 4)

Edit: Just cleared all App data and tried again; the issue still appears as described above.

codeling avatar Oct 11 '23 18:10 codeling

I have the same issue, app version 0.9.9.82, Android 14. No problems before that version.

SHA-NDY avatar Oct 12 '23 04:10 SHA-NDY

The same here, before 0.9.9.82 that worked. In 0.9.9.83 it still doesn't work :-(

yennor avatar Nov 10 '23 07:11 yennor

Hello !

This error was caused by a typo on NewsReaderListActivity.java.

switch(selectedBrowser) {
	case 0:
		openRssItemInCustomTab(currentUrl);
		break;
	case 1:
		//openRssItemInInternalBrowser(currentUrl);
		break;
	case 2:
		openRssItemInExternalBrowser(currentUrl);
		break;
}

The values used there aren't the ones set in string.xml:

<string-array name="pref_display_browser" translatable="false">
    <item>@string/pref_display_browser_cct</item>
    <item>@string/pref_display_browser_built_in</item>
    <item>@string/pref_display_browser_external</item>
</string-array>
<string-array name="pref_display_browser_values" translatable="false">
    <item>0</item>
    <item>2</item>
    <item>1</item>
</string-array>

If you select "built-in browser" instead, the external browser should open.

@mkanilsson I think you may be interested, since you are working on per-feed open-in settings.

thebaztet avatar Nov 10 '23 15:11 thebaztet

@thebaztet Your solution looks good but I think we should open "Built-In browser" in "Chrome-Custom-Tabs" as discussed here, if not, other users would have the same problem if their option is set to "Built-in Browser".

Something like

switch(selectedBrowser) {
    case 0:
    case 2:
        openRssItemInCustomTab(currentUrl);
        break;
    case 1:
        openRssItemInExternalBrowser(currentUrl);
        break;
}

Thank you!

mkanilsson avatar Nov 10 '23 17:11 mkanilsson

You're right ! I just amended my commit accordingly.

By the way, is it a problem if I use an anonymous account ? I checked the guidelines and understood it may be unsafe. If yes, feel free to take over the commit.

Thanks !

thebaztet avatar Nov 11 '23 12:11 thebaztet

I'm unsure, I know some people use anonymous accounts but I'm just a contributor so I can't answer it (pinging @David-Development because he can answer it).

If you're done with the fix, I recommend opening a PR. It should be your name on it, not mine :)

mkanilsson avatar Nov 11 '23 13:11 mkanilsson

Sorry for the delay! All merge requests will be reviewed before merging anyways. Since you already said that you will create a MR I'm okay with an anonymous account. (not 100% sure what an anonymous account is on GitHub anyways - this here? 😅)

David-Development avatar Nov 22 '23 10:11 David-Development

Sorry too for the delay, I wasn't at home. Please find the merge request above. :)

By anonymous, I meant an account with not personal informations in it. But it's just a matter of time and confidence before I begin to use my identity anyway.

Thanks !

thebaztet avatar Nov 26 '23 09:11 thebaztet