Review Request 121165: Fix "show older tweets"; use statuses/user_timeline instead of search/tweets; use follower list for DM's

Mehrdad Momeny mehrdad.momeny at gmail.com
Sat Nov 22 03:02:13 UTC 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121165/#review70765
-----------------------------------------------------------


So the whole things seems quite OK to me, (Just some coding style issues which you can check with KDE Coding style and fix them)

But for the problem that posts are adding on top:
Until now, we were only adding new posts on top of older ones, but to show older posts we need to add them at the bottom, so there's a solution, In TimelineWidget.cpp line 267 you see this code:
d->mainLayout->insertWidget(d->order, widget);
Which is were posts are actually adding to UI. You need to change the value of "order" there to -1 (Which currently is using in reverse ordering mode of Choqok)
Well, you can do this by adding a protected function to TimelineWidget class which will be available from drived class such as TwitterApiSearchTimelineWidget to TEMPORARILY change the order before adding these posts, and revert it to it's previous state afterwards. (Just make sure that Choqok is working fine in reverse mode also, Config -> Appearance dialog has the option to enable reverse mode)

But after doing so, you'll have another problem, which you have to reverse order the list of new posts before sending them into TwitterApiSearchTimelineWidget::addNewPosts() function or inside that function. There's already a loadingAnotherPage flag there which is no longer valid with your new code, you can use that flag to know whether this is the first page of search (No need for changing orders) or older posts which needs to change both above mentioned orders.

- Mehrdad Momeny


On Nov. 17, 2014, 11:46 p.m., Ian Schwarz wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121165/
> -----------------------------------------------------------
> 
> (Updated Nov. 17, 2014, 11:46 p.m.)
> 
> 
> Review request for Choqok.
> 
> 
> Repository: choqok
> 
> 
> Description
> -------
> 
> This patch does 3 things:
> 
> 1. It removes the old, stale "page browsing" that has not worked for the longest time. Instead, it introduces a button to "load more tweets" which actually works and loads older tweets. However as of now, you have to click it TWICE for the first time to work. After that, every addidtional click will retrieve more old tweets. They are shown on top of the newer ones which is quite unfortunate, I don't know how to change that. (see also https://bugs.kde.org/show_bug.cgi?id=340795)
> 
> 2. It introduces a "follower list", similar to the "friends list" for Twitter, which contains only followers' screen names. The reason for that is that on Twitter, you can only send DM's to your FOLLOWERS instead of your "friends" (i.e. people you have followed). The git version "allows" you to send them to the people you have followed which results in mute failure and no error message. We do still need the old friends list though so we can know whom we have followed (and thus whether to display the "follow" or the "unfollow" option).
> 
> 3. "Show all posts by $NAME" should not use the Twitter search/tweets API, as this API will only return tweets that are less than 7 days old. Instead, use statuses/user_timeline which returns up to 3,200 tweets of any age.
> 
> Let me state that I do not expect this patch to be accepted as is or even with minor changes. What I hope instead is that people who know more about C++/Qt/Choqok look at this and go "I see what you're trying to do, but there is a better way." and then actually propose a better way. I feel I have done as much as I could to enable Choqok to make progress towards a mostly working Twitter client for Linux.
> 
> Oh, and bumping the version to 1.4.0.1 or somesuch would be good sometime in the future. Maybe this way we can get distribution/packagers to ship a more functional version of Choqok in the future. The old 1.4.0 release is horribly broken by comparison.
> 
> 
> Diffs
> -----
> 
>   choqok/microblogs/twitter/twittersearch.cpp da85565 
>   choqok/microblogs/twitter/twitterpostwidget.cpp f8bf945 
>   choqok/microblogs/twitter/twittersearch.h 662e8d7 
>   choqok/helperlibs/twitterapihelper/twitterapisearch.cpp b3078c4 
>   choqok/helperlibs/twitterapihelper/twitterapisearchtimelinewidget.h ec40605 
>   choqok/helperlibs/twitterapihelper/twitterapisearchtimelinewidget.cpp 82dc1b1 
>   choqok/microblogs/laconica/laconicamicroblog.cpp dd86db2 
>   choqok/microblogs/laconica/laconicasearch.h 4bfac2d 
>   choqok/microblogs/laconica/laconicasearch.cpp 4b1c9c9 
>   choqok/helperlibs/twitterapihelper/twitterapidmessagedialog.cpp 70092db 
>   choqok/helperlibs/twitterapihelper/twitterapimicroblog.h b9dd97a 
>   choqok/helperlibs/twitterapihelper/twitterapimicroblog.cpp cb666cb 
>   choqok/helperlibs/twitterapihelper/twitterapisearch.h b421585 
>   choqok/helperlibs/twitterapihelper/twitterapiaccount.h d880f14 
>   choqok/helperlibs/twitterapihelper/twitterapiaccount.cpp e2efe97 
>   choqok/helperlibs/twitterapihelper/twitterapidmessagedialog.h ed36a1d 
> 
> Diff: https://git.reviewboard.kde.org/r/121165/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ian Schwarz
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/choqok-devel/attachments/20141122/d2e99516/attachment.html>


More information about the Choqok-devel mailing list