diff --git a/gajim/common/logger.py b/gajim/common/logger.py index b9221e8ba..6aba09f06 100644 --- a/gajim/common/logger.py +++ b/gajim/common/logger.py @@ -168,7 +168,7 @@ class Logger: self.open_db() self.get_jids_already_in_db() - def _really_commit(self): + def commit(self): try: self.con.commit() except sqlite.OperationalError as e: @@ -179,7 +179,7 @@ class Logger: def _timeout_commit(self): if self.commit_timout_id: return - self.commit_timout_id = GLib.timeout_add(500, self._really_commit) + self.commit_timout_id = GLib.timeout_add(500, self.commit) def simple_commit(self, sql_to_commit): """ diff --git a/gajim/roster_window.py b/gajim/roster_window.py index 9c0a2a823..234f319ba 100644 --- a/gajim/roster_window.py +++ b/gajim/roster_window.py @@ -2469,6 +2469,9 @@ 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