nilsbraden / ttrss-reader-fork

An Android-Client for the self-hosted Tiny Tiny RSS feedreader
https://www.nilsbraden.de/TTRSS-Reader/
151 stars 40 forks source link

Pressing refresh button a second time doesn't work #408

Open marteno opened 4 years ago

marteno commented 4 years ago

Hi

Pushing the refresh button a second time after a refresh does nothing, force closing the app and then pressing it again make it refresh again.

There seem to be some limit that only make it fetch 400 items so pressing it a second time is sometimes needed.

nilsbraden commented 4 years ago

Actually for me it DOES something, it does the same requests as after starting up. Logs indicate the same also:

2020-06-18 11:05:42.838 9157-9228/org.ttrssreader I/JSONConnector: {"op":"getHeadlines","show_content":"1","view_mode":"unread","limit":"200","skip":"0","include_attachments":"1","feed_id":"-4","is_cat":"1"}
2020-06-18 11:05:44.542 9157-9228/org.ttrssreader I/JSONConnector: {"op":"getHeadlines","show_content":"1","view_mode":"all_articles","limit":"200","skip":"0","since_id":"842746","include_attachments":"1","feed_id":"-4","is_cat":"1"}
2020-06-18 11:06:09.805 9157-9228/org.ttrssreader I/JSONConnector: {"op":"getHeadlines","show_content":"1","view_mode":"unread","limit":"200","skip":"0","include_attachments":"1","feed_id":"-4","is_cat":"1"}
2020-06-18 11:06:11.677 9157-9228/org.ttrssreader I/JSONConnector: {"op":"getHeadlines","show_content":"1","view_mode":"all_articles","limit":"200","skip":"0","since_id":"842746","include_attachments":"1","feed_id":"-4","is_cat":"1"}

First two lines are after starting up, second two lines are after pressing refresh. The limit in the request (200) is the API limit I can't do anything about, see https://git.tt-rss.org/git/tt-rss/wiki/ApiReference#getheadlines

Can you try to acquire logcat output? The rows containing the "getHeadlines" calls would be important. I'm raising the internal limit anyway but I'm not sure this has anything to do with your problem here. Normally I call getHeadlines several times as long as "number of returned articles == limit" and stop only when less articles are returned or internal limit is reached. But limit can also be a small number for calls to get unread articles since there might be only a few and I didn't want to fetch 200 articles when only 3 are needed.

marteno commented 3 years ago

I have missed that this issue was still open and waiting for input, sorry...

I have catched some logs but I can't find anything where I sort of can point to where I tapped the refresh icon, but I think I might have realized what is going on anyway from a high level perspective: It seems like if the "Display feed icons" is ticked and the app is started the download of icons from the server can take quite some time without any visual feedback. Tapping the refresh icon in the app during this time doesn't trigger any action, either visually or in the logs. Waiting until the icon download is done (wait until the log lines about icon download stop coming similar to "06-02 22:06:46.502 7572 10583 D m : Downloaded 3292 bytes as feed icon from https://xxxxxxxxx/tt-rss/feed-icons/124.ico ") and pressing the refresh icon trigger an update as expected.

Unticking the "Display feed icons" setting and test with complete restart of the app, waiting until the "refresh-bar" reaches right end of screen and then tapping refresh again works as expected.