bug with avatars fixed. bug with contacts statuses during reconnection was fixed

This commit is contained in:
ingvar1995 2018-06-30 15:23:04 +03:00
parent 47c115e699
commit 8411f08348
3 changed files with 10 additions and 1 deletions

View File

@ -306,6 +306,7 @@ class App:
Create new tox instance (new network settings)
:return: tox instance
"""
self._contacts_manager.reset_contacts_statuses()
self._stop_threads(False)
data = self._tox.get_savedata()
self._save_profile(data)

View File

@ -55,6 +55,14 @@ class ContactsManager(ToxSave):
def is_contact_active(self, contact):
return self._contacts[self._active_contact].tox_id == contact.tox_id
# -----------------------------------------------------------------------------------------------------------------
# Reconnection support
# -----------------------------------------------------------------------------------------------------------------
def reset_contacts_statuses(self):
for contact in self._contacts:
contact.status = None
# -----------------------------------------------------------------------------------------------------------------
# Work with active friend
# -----------------------------------------------------------------------------------------------------------------

View File

@ -254,7 +254,7 @@ class FileTransfersHandler(ToxSave):
if ra.state != FILE_TRANSFER_STATE['CANCELLED']:
self._file_transfers[(friend_number, file_number)] = ra
ra.set_transfer_finished_handler(self.transfer_finished)
else:
elif not size:
friend.reset_avatar(self._settings['identicons'])
def _send_avatar_to_contacts(self):