TwidereProject / TwidereX-Android

Next generation of Twidere for Android
GNU General Public License v3.0
995 stars 53 forks source link

[Feature Request] Support for threads #267

Closed iTrooz closed 1 year ago

iTrooz commented 3 years ago

Twitter threads (user replying to himself) are difficult to see

I'm not sure how threads work as I do not use twitter often, but maybe the solution would be to show the user's answer in priority under his tweet ?

Tlaster commented 3 years ago

Thread is a little bit complicated, the Twitter API does not return the same order as the web page, and it's hard to choose the right order since the API is pagination, and the reply to self might be the next page. We do offer a nitter option to get a better thread, you can try it if you want.

Pitoucol commented 3 years ago

I've test Nitter today (nitter.net). I don't see any thread enhancement. Am I using the appropriate url for nitter ?

One other problem in the timeline tweets, is that threads are not group together. If I open a thread, I'll read all the tweets from the thread, but I've got them also in the timeline. If I use nitter, will all the timeline been impacted or only the thread I've just open ?

schmittlauch commented 3 years ago

When it comes to thread support in 3rd party apps, I am aware of two approaches to resolving them:

https://github.com/Wunderfitz/harbour-piepmatz uses web scraping of the Twitter website. Advantage: works independent of tweet age Downside: brittle, prone to break when website changes

https://github.com/IBBoard/cawbird uses the search API. Advantage: uses official API functions instead of brittle web scraping Downside: only works a few days after tweet publication due to search API restrictions

Tlaster commented 3 years ago

I've test Nitter today (nitter.net). I don't see any thread enhancement. Am I using the appropriate url for nitter ?

Nitter support can do some help on the thread, but it's still not perfect, nitter.net might have rate limit and you can try other instances, once the nitter instance hits rate limit Twidere X will fall back to Twitter Search API which is the same as before.

One other problem in the timeline tweets, is that threads are not group together. If I open a thread, I'll read all the tweets from the thread, but I've got them also in the timeline. If I use nitter, will all the timeline been impacted or only the thread I've just open ?

And nitter is only used in the thread currently, if you got threads in the timeline after reading the thread, it might be a bug and you can fill a bug report.

Pitoucol commented 3 years ago

It's difficult for me to understand the way twidere X will deal with thread. If someone is writting a thread, I'll see all the thread's messages. But :

  1. Sometimes order isn't correct. (third message is between first and second)
  2. Thread's messages aren't grouped together in the TL. I see all the messages and it's like they have no link together.
  3. When opening a thread (or a message which is part of a thread), I often only see the message, not the whole thread. Sometimes just the message before. I can't click on the message to see next message. Sometimes answers are'nt loaded, but often I can see answers for the whole thread.

So, I don't know how to help you to understand what I'm facing. Maybe we can talk about a specific thread to see ?

yoshimo commented 3 years ago

https://twittercommunity.com/t/twitter-api-v2-get-thread-tweets/152179 does this help? how does the official client do it? Can we help the parsing by looking at the text and use hints like /2 , (1) and so on?

Pitoucol commented 3 years ago

I've just test with three different views : twitter, nitter.net and Twiderex.

Twitter only shows original message from the thread. If you want to see more, you have to click on the link to see the whole thread.

With nitter.net, it's easier to see the thread. but there is problems in the chronology order. Some old tweets are before newest tweets

But I can't set a working nitter third party in twiderex, as for the exact same user (as reported before with nitter.net), tweet order is completely different and there is no thread at all. With or without nitter.net, it's the same order and presentation.

tcely commented 2 years ago

I personally think the search option is good enough to prioritize and order the tweeted replies.

Searching this and using the latest tab in the official app gives me the expected set of replies.

from:TheBuilderJR to:TheBuilderJR conversation_id:1378382979148312580

However, if you are concerned that search won't get the latest tweets, the easiest way to grab those is to load the author's profile. All of their tweets and replies are returned with the newest on the first page.

This page has a good summary of the limits: https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/migrate

I have a bot that uses that approach, it has worked very well for me.

h-2 commented 2 years ago

The Fritter Android app seems to get it right most of the time. Maybe you can get inspiration from them?

Tlaster commented 1 year ago

Threading should be improved after 1.7.0-beta01.