Unique TTS intent

pull/217/head
M66B 6 months ago
parent 58a6dd710e
commit afe737a4f0

@ -1341,6 +1341,7 @@ public class EntityRule {
.append(' ').append(preview);
Intent intent = new Intent(context, ServiceTTS.class);
intent.setAction("tts:" + message.id);
intent.putExtra(ServiceTTS.EXTRA_FLUSH, false);
intent.putExtra(ServiceTTS.EXTRA_TEXT, sb.toString());
intent.putExtra(ServiceTTS.EXTRA_LANGUAGE, message.language);

@ -3735,6 +3735,7 @@ public class FragmentMessages extends FragmentBase
if (tts) {
Intent intent = new Intent(getContext(), ServiceTTS.class);
intent.setAction("tts:" + message.id);
intent.putExtra(ServiceTTS.EXTRA_FLUSH, true);
intent.putExtra(ServiceTTS.EXTRA_TEXT, "");
intent.putExtra(ServiceTTS.EXTRA_LANGUAGE, message.language);
@ -3790,6 +3791,7 @@ public class FragmentMessages extends FragmentBase
return;
Intent intent = new Intent(getContext(), ServiceTTS.class);
intent.setAction("tts:" + message.id);
intent.putExtra(ServiceTTS.EXTRA_FLUSH, true);
intent.putExtra(ServiceTTS.EXTRA_TEXT, text);
intent.putExtra(ServiceTTS.EXTRA_LANGUAGE, message.language);

@ -1337,6 +1337,7 @@ class NotificationHelper {
if (message.content && notify_tts) {
Intent tts = new Intent(context, ServiceTTS.class);
tts.setAction("tts:" + message.id);
tts.putExtra(ServiceTTS.EXTRA_FLUSH, true);
tts.putExtra(ServiceTTS.EXTRA_TEXT, "");
tts.putExtra(ServiceTTS.EXTRA_LANGUAGE, message.language);

Loading…
Cancel
Save