Skip to content

Commit

Permalink
fix: disable the tts isolate (#1300)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmo314 authored Aug 3, 2024
1 parent ce647ff commit c3c1aad
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'dart:async';
import 'dart:convert';
import 'dart:isolate';

import 'package:audioplayers/audioplayers.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
Expand Down Expand Up @@ -55,7 +54,6 @@ import 'package:rtchat/screens/settings/tts/languages.dart';
import 'package:rtchat/screens/settings/tts/voices.dart';
import 'package:rtchat/screens/settings/twitch/badges.dart';
import 'package:rtchat/themes.dart';
import 'package:rtchat/tts_isolate.dart' as tts_isolate;
import 'package:streaming_shared_preferences/streaming_shared_preferences.dart';

void updateChannelSubscription(String? data) {
Expand All @@ -74,10 +72,10 @@ void main() async {
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
final prefs = await StreamingSharedPreferences.instance;

final currentLocale = PlatformDispatcher.instance.locale;
// final currentLocale = PlatformDispatcher.instance.locale;

await tts_isolate.isolateMain(
ReceivePort().sendPort, channelStreamController, prefs, currentLocale);
// await tts_isolate.isolateMain(
// ReceivePort().sendPort, channelStreamController, prefs, currentLocale);

if (!kDebugMode) {
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError;
Expand Down

0 comments on commit c3c1aad

Please sign in to comment.