bug fixes and history export

This commit is contained in:
ingvar1995 2016-03-15 23:35:15 +03:00
parent ae50efa2e6
commit 44e5e7d0a6
5 changed files with 20 additions and 2 deletions

View file

@ -186,6 +186,7 @@ class Friend(Contact):
def __del__(self):
self.set_visibility(False)
del self._widget
del self._message_getter
# -----------------------------------------------------------------------------------------------------------------
# History support
@ -210,6 +211,7 @@ class Friend(Contact):
Get data to save in db
:return: list of unsaved messages or []
"""
del self._message_getter
return self._corr[-self._unsaved_messages:] if self._unsaved_messages else []
def get_corr(self):
@ -513,6 +515,9 @@ class Profile(Contact, Singleton):
if num is None or num == self.get_active_number():
self._messages.clear()
def export_history(self, directory):
self.history.export(directory)
# -----------------------------------------------------------------------------------------------------------------
# Factories for friend and message items
# -----------------------------------------------------------------------------------------------------------------