Added basic replacement for audioRecorder based in MVP+interactor

This commit is contained in:
2019-01-04 17:32:17 -06:00
parent 9d2fc5bc6e
commit 2804400910
6 changed files with 179 additions and 2 deletions

View File

@@ -6,7 +6,9 @@ from __future__ import unicode_literals
import os
import logging
import widgetUtils
from . import audioRecorder
import presenters
import interactors
from wxUI.dialogs import audioRecorder as gui2
from mutagen.id3 import ID3
from sessionmanager.utils import seconds_to_string
from wxUI.dialogs import attach as gui
@@ -91,7 +93,7 @@ class attach(object):
self.dialog.remove.Enable(True)
def upload_voice_message(self, *args, **kwargs):
a = audioRecorder.audioRecorder()
a = presenters.audioRecorderPresenter(view=gui2.audioRecorderDialog(), interactor=interactors.audioRecorderInteractor())
if a.file != None and a.duration != 0:
audioInfo = {"type": "voice_message", "file": a.file, "from": "local"}
self.attachments.append(audioInfo)