Fixed displaying friendship notifications in newsfeed

This commit is contained in:
Manuel Cortez 2016-03-23 11:48:30 -06:00
parent 8500f2d327
commit 91dcdd98a9
2 changed files with 3 additions and 4 deletions

View File

@ -40,7 +40,7 @@ class baseBuffer(object):
self.tab.list.insert_item(reversed, *item_) self.tab.list.insert_item(reversed, *item_)
def get_items(self, show_nextpage=False): def get_items(self, show_nextpage=False):
""" Retrieves items from the VK API. This function is called repeatedly by the main controller and users could call it as well with the update buffer option. """ Retrieves items from the VK API. This function is called repeatedly by the main controller and users could call it implicitly as well with the update buffer option.
show_nextpage boolean: If it's true, it will try to load previous results.""" show_nextpage boolean: If it's true, it will try to load previous results."""
num = getattr(self.session, "get_newsfeed")(show_nextpage=show_nextpage, name=self.name, *self.args, **self.kwargs) num = getattr(self.session, "get_newsfeed")(show_nextpage=show_nextpage, name=self.name, *self.args, **self.kwargs)
if show_nextpage == False: if show_nextpage == False:
@ -106,7 +106,6 @@ class baseBuffer(object):
def open_post(self): def open_post(self):
post = self.session.db[self.name]["items"][self.tab.list.get_selected()] post = self.session.db[self.name]["items"][self.tab.list.get_selected()]
if post.has_key("type") and post["type"] == "audio": if post.has_key("type") and post["type"] == "audio":
print "opening audio"
a = posts.audio(self.session, post["audio"]["items"]) a = posts.audio(self.session, post["audio"]["items"])
a.dialog.get_response() a.dialog.get_response()
a.dialog.Destroy() a.dialog.Destroy()

View File

@ -292,8 +292,8 @@ class friendship(object):
self.set_friends_list(list_of_friends) self.set_friends_list(list_of_friends)
def get_friend_names(self): def get_friend_names(self):
self.friends = self.post["friends"][1:] self.friends = self.post["friends"]["items"]
return [self.session.get_user_name(i["uid"]) for i in self.friends] return [self.session.get_user_name(i["user_id"]) for i in self.friends]
def set_friends_list(self, friendslist): def set_friends_list(self, friendslist):
for i in friendslist: for i in friendslist: