From eba898ebe48696de006dc800b941a5b463040ebf Mon Sep 17 00:00:00 2001 From: tanlongsheng <252620078@qq.com> Date: Thu, 4 Dec 2025 11:57:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A3=B0=E9=9F=B3=E5=A4=8D?= =?UTF-8?q?=E5=88=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/modules/timbre/bindings/timbre_binding.dart | 2 +- lib/modules/timbre/controllers/timbre_controller.dart | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/modules/timbre/bindings/timbre_binding.dart b/lib/modules/timbre/bindings/timbre_binding.dart index 6883836f7..15a9ecdb4 100644 --- a/lib/modules/timbre/bindings/timbre_binding.dart +++ b/lib/modules/timbre/bindings/timbre_binding.dart @@ -4,6 +4,6 @@ import '../controllers/timbre_controller.dart'; class TimbreBinding extends Bindings { @override void dependencies() { - Get.put(TimbreController()); + Get.lazyPut(() => TimbreController()); } } diff --git a/lib/modules/timbre/controllers/timbre_controller.dart b/lib/modules/timbre/controllers/timbre_controller.dart index d976105fa..37e71efd9 100644 --- a/lib/modules/timbre/controllers/timbre_controller.dart +++ b/lib/modules/timbre/controllers/timbre_controller.dart @@ -9,12 +9,7 @@ import 'package:path/path.dart' as path; import 'package:path_provider/path_provider.dart'; import 'package:record/record.dart'; -import '../../../data/services/speech_factory.dart'; -import '../../settings/controllers/settings_controller.dart'; - class TimbreController extends GetxController { - final SettingsController settingsController = Get.find(); - final GetStorage _storage = GetStorage(); final _record = AudioRecorder(); @@ -291,7 +286,6 @@ class TimbreController extends GetxController { void selectTone(Map data) { if (!data['isUsable'] || type.value == data['type']) return; type.value = data['type']; - settingsController.timbreName.value = data['name']; _storage.write('timbre', data['type']); } }