Commit to DB at the last moment on shutdown

It seems some events fire after prepare_quit(), notably
set_room_last_message_time()
This commit is contained in:
Philipp Hörist 2017-07-21 12:34:38 +02:00
parent 2dedf38f51
commit 054960ebb0
2 changed files with 4 additions and 3 deletions

View File

@ -259,6 +259,10 @@ class GajimApplication(Gtk.Application):
if hasattr(self.interface, 'roster') and self.interface.roster:
self.interface.roster.prepare_quit()
# Commit any outstanding SQL transactions
from common import gajim
gajim.logger.commit()
def do_handle_local_options(self, options: GLib.VariantDict) -> int:
logging_helpers.init()

View File

@ -2468,9 +2468,6 @@ class RosterWindow:
gajim.interface.hide_systray()
self.save_done = True
# Commit any outstanding SQL transactions
gajim.logger.commit()
def quit_gtkgui_interface(self):
"""
When we quit the gtk interface - exit gtk