mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-09-20 12:44:48 -04:00
pantalaimon: Only send UI messages if there is a queue.
This commit is contained in:
parent
ad65fbf1a7
commit
b9d518fad8
2 changed files with 4 additions and 2 deletions
|
@ -222,6 +222,7 @@ class PanClient(AsyncClient):
|
||||||
|
|
||||||
async def send_message(self, message):
|
async def send_message(self, message):
|
||||||
"""Send a thread message to the UI thread."""
|
"""Send a thread message to the UI thread."""
|
||||||
|
if self.queue:
|
||||||
await self.queue.put(message)
|
await self.queue.put(message)
|
||||||
|
|
||||||
async def send_update_devices(self, devices):
|
async def send_update_devices(self, devices):
|
||||||
|
|
|
@ -259,6 +259,7 @@ class ProxyDaemon:
|
||||||
|
|
||||||
async def send_ui_message(self, message):
|
async def send_ui_message(self, message):
|
||||||
"""Send a thread message to the UI thread."""
|
"""Send a thread message to the UI thread."""
|
||||||
|
if self.send_queue:
|
||||||
await self.send_queue.put(message)
|
await self.send_queue.put(message)
|
||||||
|
|
||||||
async def receive_message(self, message):
|
async def receive_message(self, message):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue