summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-03-13 14:00:46 +0100
committermathieui <mathieui@mathieui.net>2021-03-13 14:00:46 +0100
commitec6a98e99f6268b85b8c5059ab46cfd3fcc3d4c4 (patch)
tree043ab09d33e35ef05ef7daf6063b245ef3d37764
parent9c6e89d0e5714313d2891f1055254b535b4db49f (diff)
downloadpoezio-ec6a98e99f6268b85b8c5059ab46cfd3fcc3d4c4.tar.gz
poezio-ec6a98e99f6268b85b8c5059ab46cfd3fcc3d4c4.tar.bz2
poezio-ec6a98e99f6268b85b8c5059ab46cfd3fcc3d4c4.tar.xz
poezio-ec6a98e99f6268b85b8c5059ab46cfd3fcc3d4c4.zip
Add missing ensure_future to bookmarks.save() calls
-rw-r--r--poezio/core/core.py4
-rw-r--r--poezio/tabs/muctab.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/poezio/core/core.py b/poezio/core/core.py
index f8be2593..fb05623a 100644
--- a/poezio/core/core.py
+++ b/poezio/core/core.py
@@ -396,7 +396,9 @@ class Core:
if value not in ('pep', 'privatexml'):
return
self.bookmarks.preferred = value
- self.bookmarks.save(self.xmpp, core=self)
+ asyncio.ensure_future(
+ self.bookmarks.save(self.xmpp, core=self)
+ )
def on_gaps_config_change(self, option, value):
"""
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index 5582914a..34cec0ca 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -1510,7 +1510,9 @@ class MucTab(ChatTab):
if config.get('synchronise_open_rooms'):
if self.jid in self.core.bookmarks:
self.core.bookmarks[self.jid].autojoin = False
- self.core.bookmarks.save(self.core.xmpp)
+ asyncio.ensure_future(
+ self.core.bookmarks.save(self.core.xmpp)
+ )
self.core.close_tab(self)
def on_close(self) -> None: