Started implementation for friends removal
This commit is contained in:
parent
2c64581a2c
commit
97380e9833
@ -1095,7 +1095,20 @@ class peopleBuffer(feedBuffer):
|
||||
pass
|
||||
|
||||
def decline_friendship(self, *args, **kwargs):
|
||||
pass
|
||||
person = self.get_post()
|
||||
if person == None:
|
||||
return
|
||||
user = self.session.get_user(person["id"])
|
||||
question = commonMessages.remove_friend(user)
|
||||
if question == widgetUtils.NO:
|
||||
return
|
||||
result = self.session.vk.client.friends.delete(user_id=person["id"])
|
||||
if "friend_deleted" in result:
|
||||
msg = _("You've deleted {user1_nom} from your friends.").format(**user,)
|
||||
print(msg)
|
||||
pub.sendMessage("notify", message=msg)
|
||||
self.session.db[self.name]["items"].pop(self.tab.list.get_selected())
|
||||
self.tab.list.remove_item(self.tab.list.get_selected())
|
||||
|
||||
def keep_as_follower(self, *args, **kwargs):
|
||||
pass
|
||||
|
@ -49,3 +49,6 @@ def group_joined():
|
||||
|
||||
def proxy_question():
|
||||
return wx.MessageDialog(None, _("If you live in a country where VK is blocked, you can use a proxy to bypass such restrictions. Socializer includes a working proxy to ensure all users can connect to VK. Do you want to use Socializer through the proxy?"), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
||||
|
||||
def remove_friend(user):
|
||||
return wx.MessageDialog(None, _("Are you sure you want to remove {user1_nom} from your friends?").format(**user), _("Attention"), style=wx.ICON_QUESTION|wx.YES_NO).ShowModal()
|
Loading…
Reference in New Issue
Block a user