bishopmatthew / HackerNews

An open source Hacker News client for Android.
230 stars 61 forks source link

Link inside app is not opened in new tab #33

Open memoryonrepeat opened 10 years ago

memoryonrepeat commented 10 years ago

When i open a link from inside the app, it is not opened in new tab; instead it overwrites my current opening tab on Chrome.

I am new to Android dev and still learning (i'm also trying to write a blog reader app) , so i don't know how complicated it is to fix this bug. But i like the app and really wants to contribute, so if you think i am capable, please leave this bug to me. We can discuss here to tackle the problem

bishopmatthew commented 10 years ago

Hey! Sorry for the delay in getting back to you -- I've been getting killed with work. The first time, it should open a new tab in Chrome, and then every other link from the app should open in the same tab. Is that what's happening, or are you seeing something else?

memoryonrepeat commented 10 years ago

Hi Matt, no problem -- thanks for the reply. Yes that's the way it works. So i guess it's what you intended ? For me it's a bit inconvenient, since most of the time i just want to open any link that sounds interesting then come back to the discussion in the app, and read the link later when i have time. How about we dedicate a new tab for every new link ? I think it would be more user-friendly, since during a HN discussion there seems to be lots resources to check out, but unfortunately we can't do them in one go.

pkillian commented 10 years ago

Or we could add this as an option in the settings of the app for those that want new behavior? "Open each story in new tab" check box should do it.

bishopmatthew commented 10 years ago

Hi @tienthanh8490, no, not necessarily. I just wanted to make sure it wasn't doing something worse like overwriting some tab you already had open (that wasn't opened by the app). I do understand what you mean about opening lots of tabs -- my 47 open Firefox tabs should be proof of that. Unfortunately I'm not sure if this is actually possible.

There's two ways things get opened in the browser:

The open in browser button (explicitly opened via Intent) and Autolink -- handles links in comments

I'm not even sure if we can control the tabs for things we're opening via Intent (let alone autolink). If anyone has any ideas, I'm happy to hear them.

bishopmatthew commented 10 years ago

Hi @tienthanh8490 , could you email me at matt@airlocksoftware.com? I have a potential solution I want you to try out.

Thanks, Matt