|
|
@ -68,11 +68,7 @@ class TranslationController extends GetxController { |
|
|
static const String _targetLanguageKey = 'translation_target_language'; |
|
|
static const String _targetLanguageKey = 'translation_target_language'; |
|
|
|
|
|
|
|
|
// 分页加载相关状态 |
|
|
// 分页加载相关状态 |
|
|
final isLoadingMore = false.obs; // 是否正在加载更多历史记录 |
|
|
|
|
|
final hasMoreHistory = true.obs; // 是否还有更多历史记录 |
|
|
|
|
|
final currentPage = 1.obs; // 当前页码 |
|
|
|
|
|
final pageSize = 20; // 每页记录数量 |
|
|
final pageSize = 20; // 每页记录数量 |
|
|
final isLoadingMoreError = false.obs; // 加载更多时是否出错 |
|
|
|
|
|
bool _scrollListenerSetup = false; // 滚动监听器设置标志 |
|
|
bool _scrollListenerSetup = false; // 滚动监听器设置标志 |
|
|
|
|
|
|
|
|
RxInt activeSpeaker = 0.obs; // 0=无激活, 1=按钮1, 2=按钮2 |
|
|
RxInt activeSpeaker = 0.obs; // 0=无激活, 1=按钮1, 2=按钮2 |
|
|
@ -110,6 +106,10 @@ class TranslationController extends GetxController { |
|
|
RxList<TranslationItem> get translationHistory => |
|
|
RxList<TranslationItem> get translationHistory => |
|
|
_historyManager.translationHistory; |
|
|
_historyManager.translationHistory; |
|
|
ScrollController get scrollController => _historyManager.scrollController; |
|
|
ScrollController get scrollController => _historyManager.scrollController; |
|
|
|
|
|
// 添加历史管理器状态访问器 |
|
|
|
|
|
RxBool get hasMoreHistory => _historyManager.hasMoreHistory; |
|
|
|
|
|
RxBool get isLoadingMore => _historyManager.isLoadingMore; |
|
|
|
|
|
RxBool get isLoadingMoreError => _historyManager.isLoadingMoreError; |
|
|
// 其他 |
|
|
// 其他 |
|
|
StreamSubscription? _recognitionSubscription; |
|
|
StreamSubscription? _recognitionSubscription; |
|
|
StreamSubscription? _voiceInteractionSubscription; |
|
|
StreamSubscription? _voiceInteractionSubscription; |
|
|
|