mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
Fixes in inverted buffers, fixes in people buffers too
This commit is contained in:
parent
5a1fd9bb75
commit
2a83440c44
@ -278,7 +278,7 @@ class baseBufferController(bufferController):
|
|||||||
if self.buffer.list.get_count() == 0:
|
if self.buffer.list.get_count() == 0:
|
||||||
for i in self.session.db[self.name]:
|
for i in self.session.db[self.name]:
|
||||||
tweet = self.compose_function(i, self.session.db, self.session.settings["general"]["relative_times"])
|
tweet = self.compose_function(i, self.session.db, self.session.settings["general"]["relative_times"])
|
||||||
self.buffer.list.insert_item(self.session.settings["general"]["reverse_timelines"], *tweet)
|
self.buffer.list.insert_item(False, *tweet)
|
||||||
self.buffer.set_position(self.session.settings["general"]["reverse_timelines"])
|
self.buffer.set_position(self.session.settings["general"]["reverse_timelines"])
|
||||||
elif self.buffer.list.get_count() > 0:
|
elif self.buffer.list.get_count() > 0:
|
||||||
if self.session.settings["general"]["reverse_timelines"] == False:
|
if self.session.settings["general"]["reverse_timelines"] == False:
|
||||||
@ -556,7 +556,6 @@ class peopleBufferController(baseBufferController):
|
|||||||
return tweet
|
return tweet
|
||||||
|
|
||||||
def add_new_item(self, item):
|
def add_new_item(self, item):
|
||||||
self.session.db[self.name]["items"].append(item)
|
|
||||||
tweet = self.compose_function(item, self.session.db, self.session.settings["general"]["relative_times"])
|
tweet = self.compose_function(item, self.session.db, self.session.settings["general"]["relative_times"])
|
||||||
if self.session.settings["general"]["reverse_timelines"] == False:
|
if self.session.settings["general"]["reverse_timelines"] == False:
|
||||||
self.buffer.list.insert_item(False, *tweet)
|
self.buffer.list.insert_item(False, *tweet)
|
||||||
|
@ -371,7 +371,7 @@ class Controller(object):
|
|||||||
""" Searches words or users in twitter. This creates a new buffer containing the search results."""
|
""" Searches words or users in twitter. This creates a new buffer containing the search results."""
|
||||||
log.debug("Creating a new search...")
|
log.debug("Creating a new search...")
|
||||||
dlg = dialogs.search.searchDialog(value)
|
dlg = dialogs.search.searchDialog(value)
|
||||||
if dlg.get_response() == widgetUtils.OK and dlg.get_text() != "":
|
if dlg.get_response() == widgetUtils.OK and dlg.get("term") != "":
|
||||||
term = dlg.get("term")
|
term = dlg.get("term")
|
||||||
buffer = self.get_best_buffer()
|
buffer = self.get_best_buffer()
|
||||||
if dlg.get("tweets") == True:
|
if dlg.get("tweets") == True:
|
||||||
|
@ -68,10 +68,16 @@ class streamer(TwythonStreamer):
|
|||||||
|
|
||||||
def check_follower(self, data):
|
def check_follower(self, data):
|
||||||
if data["target"]["screen_name"] == self.session.db["user_name"]:
|
if data["target"]["screen_name"] == self.session.db["user_name"]:
|
||||||
self.session.db["followers"]["items"].append(data["source"])
|
if self.session.settings["general"]["reverse_timelines"] == False:
|
||||||
|
self.session.db["followers"]["items"].append(data["source"])
|
||||||
|
else:
|
||||||
|
self.session.db["followers"]["items"].insert(0, data["source"])
|
||||||
pub.sendMessage("follower", data=data["source"], user = self.get_user())
|
pub.sendMessage("follower", data=data["source"], user = self.get_user())
|
||||||
else:
|
else:
|
||||||
self.session.db["friends"]["items"].append(data["target"])
|
if self.session.settings["general"]["reverse_timelines"] == False:
|
||||||
|
self.session.db["friends"]["items"].append(data["target"])
|
||||||
|
else:
|
||||||
|
self.session.db["friends"]["items"].insert(0, data["target"])
|
||||||
pub.sendMessage("friend", data=data["target"], user=self.get_user())
|
pub.sendMessage("friend", data=data["target"], user=self.get_user())
|
||||||
|
|
||||||
###
|
###
|
||||||
|
Loading…
Reference in New Issue
Block a user