Skip to content
This repository has been archived by the owner on Mar 2, 2021. It is now read-only.

Commit

Permalink
only show older tweets
Browse files Browse the repository at this point in the history
  • Loading branch information
lucahammer committed Jan 2, 2016
1 parent 934315b commit 798641b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ You are welcome! Take the ideas and code your own implementation because mine is
ToDo-List
------------------------------------------------------
* Write about the goal of the project - [done (in german)](http://www.2-blog.net/2016/01/01/das-ist-wischwasch-timeline-aufraeumen/)
* Add mechanism to prevent multiple votes on the same tweet
* Add mechanism to prevent multiple votes on the same tweet (done)
* Undo button (works with keyboard)
* Swipe up/down to vote neutral
* Option Panel (exclude Retweets, Replies, Links, Images; swipe right == heart)
Expand Down
3 changes: 2 additions & 1 deletion default/main/control/tweets.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ def tweets():

api = tweepy.API(authy)
if max_tweet_id != '0' and max_tweet_id != 'undefined':
tweets = api.home_timeline(count=30, max_id=max_tweet_id)
max_tweet_id = int(max_tweet_id)-1 #only load tweets that are older
tweets = api.home_timeline(count=30, max_id=str(max_tweet_id))
else:
tweets = api.home_timeline(count=30)
tweetstring = '{"tweets":['
Expand Down
1 change: 1 addition & 0 deletions default/main/templates/bit/script.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
$.getJSON('tweets.json?max_id='+max_tweet_id, function(data) {
//console.log("got new tweets");
newCards = '<div class="demo__card-cont">';
data.tweets.reverse();
data.tweets.forEach(function(item) {
newCards += '<div class="demo__card" data-tweetid="'+item.id+'"><div class="demo__card__btm"><p class="demo__card__we">';
newCards += item.status;
Expand Down

0 comments on commit 798641b

Please sign in to comment.