milesmcc / LibreNews-Android

An Android client for the LibreNews server
GNU General Public License v3.0
35 stars 8 forks source link

API returns articles with no link; and no interface denotes this #31

Open Zazie-Lavender opened 5 years ago

Zazie-Lavender commented 5 years ago

So upon a little deeper investigation, I notice a recent flash completely lacked a Link at all. This prompted #30 at first but I got curious and checked the backend response since it was linked in readme.

{"channels":["Breaking News","Announcements"],"latest":[{"channel":"Breaking News","id":"1105062338351296513","link":"None","source":"BBC","text":"Russian athletes will remain banned from international competitions until further notice, says athletics' governing body.\n\nIn\u2026","time":"Mon Mar 11 11:06:07 +0000 2019"},{"channel":"Breaking News","id":"1105055050886508550","link":"https://bbc.in/2EQRNsr","source":"BBC","text":"Angus Sinclair, thought to be Scotland's worst serial killer, has died at the age of 73","time":"Mon Mar 11 10:37:09 +0000 2019"},[....]

API output truncated for example

So I noticed the recent flash lacked any sort of link, and I'd suggest some form of toast or notification when the clicked flash has no valid URI link provided, so that the user isnt confused when nothing happens on click of a particular flash.

Breaking News • BBC [Mon Mar 11 06:33:18 CDT 2019]
LibreNews
pkg: app.librenews.io.librenews
key: 0|app.librenews.io.librenews|167654918|null|10345
icon: Icon(typ=RESOURCE pkg=app.librenews.io.librenews id=0x7f02005b)
sound: DEFAULT
vibrate: none
visibility: PRIVATE
priority: DEFAULT
intent: Intent(pkg=app.librenews.io.librenews (activity))
extras
  android.title: Breaking News • BBC
  android.subText: null
  android.template: android.app.Notification$BigTextStyle
  android.showChronometer: false
  android.text: Russian athletes will remain banned from international competitions until further notice, says athle...
  android.progress: 0
  android.progressMax: 0
  android.showWhen: true
  android.largeIcon: null
  android.bigText: Russian athletes will remain banned from international competitions until further notice, says athle...
  android.infoText: null
  android.originatingUserId: 0
  android.progressIndeterminate: false
  android.remoteInputHistory: null
parcel size: 1712 ashmem: 0
milesmcc commented 5 years ago

Hmm, this is a good idea. I haven't worked on the Android app in awhile, but this is definitely an important and worthwhile improvement.