-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for displaying threads #31
Comments
im ok with this but can we leave these props out of |
To implement threads I need to reorder the tweets data as provided by the home_timeline api because the tweets in the thread need to be contiguous. Once they are thus reordered it is simpler to stick the information about thread membership on the tweet data than to maintain an auxiliary data structure for the thread membership. If you have any thoughts on how to do this without muddling the twitter data please do let me know. |
@sudarshang thats fine but I dont think you would need to do it in the myOrderedTweets.map((tweet, idx, arr) => (
<Tweet data={tweet} isThreadStart={idx === 0} isThreadMember={idx > 0 && idx < arr.length -1}
isThreadEnd={idx === arr.length -1} />
)) |
Got you! Thanks for your suggestion. |
The twitter api does not directly support threads. We can still infer the start, end, and membership of a thread from the
in_reply_to_status_id
field. While displaying tweets it might be beneficial to indicate that they are part of a thread.Here is how I would like to implement this:-
To mimic's Twitter desktops implementation of thread display we would need to add a pseudo div after the user avatar for adding a bar. The tweet
data
will have following boolean fieldsisThreadStart
,isThreadMember
andisThreadEnd
The text was updated successfully, but these errors were encountered: