ShawnDuan / MyTwitter

0 stars 0 forks source link

Required feature incorrect #2

Open codepathreview opened 7 years ago

codepathreview commented 7 years ago

@ShawnDuan it seems from your code that you do not immediately add the newly composed tweet to the timeline, on successfully posting it to Twitter, but instead rely on timeline refresh which might not always be reliable. https://github.com/ShawnDuan/MyTwitter/blob/b8ba57edf2dd13bc10395b4d162410eb898c90e0/app/src/main/java/com/shawn_duan/mytwitter/fragments/ComposeTweetDialogFragment.java#L90

See the below hint which can be found here https://courses.codepath.com/courses/intro_to_android/unit/3#!hints Note #1: Make sure that after you compose a tweet that the new tweet shows up in the timeline. To do this, refreshing the timeline may not be enough because of the lag before the new tweet shows up in the timeline API call. Instead, after the tweet is successfully posted to twitter from within the compose screen, we can pass the Tweet back to the TimelineActivity through the intent result system to the parent activity and inject the created tweet directly into the adapter for the timeline from within onActivityResult. See the intents cliffnotes for how to return the result back to the timeline activity.

Fix accordingly and resubmit

ShawnDuan commented 7 years ago

Resubmitted, please review.