mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2026-03-06 09:27:33 +01:00
Commit
This commit is contained in:
@@ -5,6 +5,7 @@ import output
|
|||||||
from .base import BaseBuffer
|
from .base import BaseBuffer
|
||||||
from wxUI.buffers.blueski import panels as BlueskiPanels
|
from wxUI.buffers.blueski import panels as BlueskiPanels
|
||||||
from sessions.blueski import compose
|
from sessions.blueski import compose
|
||||||
|
from mysc.thread_utils import call_threaded
|
||||||
|
|
||||||
log = logging.getLogger("controller.buffers.blueski.chat")
|
log = logging.getLogger("controller.buffers.blueski.chat")
|
||||||
|
|
||||||
@@ -96,14 +97,15 @@ class ChatBuffer(BaseBuffer):
|
|||||||
if dlg.ShowModal() == wx.ID_OK:
|
if dlg.ShowModal() == wx.ID_OK:
|
||||||
text = dlg.GetValue()
|
text = dlg.GetValue()
|
||||||
if text:
|
if text:
|
||||||
|
def do_send():
|
||||||
try:
|
try:
|
||||||
self.session.send_chat_message(self.convo_id, text)
|
self.session.send_chat_message(self.convo_id, text)
|
||||||
self.session.sound.play("dm_sent.ogg")
|
wx.CallAfter(self.session.sound.play, "dm_sent.ogg")
|
||||||
output.speak(_("Message sent."))
|
wx.CallAfter(output.speak, _("Message sent."))
|
||||||
# Refresh
|
wx.CallAfter(self.start_stream, True, False)
|
||||||
self.start_stream(mandatory=True, play_sound=False)
|
except Exception:
|
||||||
except:
|
wx.CallAfter(output.speak, _("Failed to send message."), True)
|
||||||
output.speak(_("Failed to send message."))
|
call_threaded(do_send)
|
||||||
dlg.Destroy()
|
dlg.Destroy()
|
||||||
|
|
||||||
def send_message(self, *args, **kwargs):
|
def send_message(self, *args, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user