Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

not pop up cm for file log

21pagesdb66ffc86800
diff --git a/flutter/lib/models/chat_model.dart b/flutter/lib/models/chat_model.dart
index d28bc7d8e..ed216e500 100644
--- a/flutter/lib/models/chat_model.dart
+++ b/flutter/lib/models/chat_model.dart
@@ -73,7 +73,7 @@ class ChatModel with ChangeNotifier {
Offset chatWindowPosition = Offset(20, 80);
- void setChatWindowPosition(Offset position) {
+ void setChatWindowPosition(Offset position) {
chatWindowPosition = position;
notifyListeners();
}
@@ -278,16 +278,6 @@ class ChatModel with ChangeNotifier {
}
}
- showSidePage() async {
- if (isDesktop) {
- if (isConnManager) {
- if (!_isShowCMSidePage) {
- await toggleCMSidePage();
- }
- }
- }
- }
-
toggleCMChatPage(MessageKey key) async {
if (gFFI.chatModel.currentKey != key) {
gFFI.chatModel.changeCurrentKey(key);
diff --git a/flutter/lib/models/cm_file_model.dart b/flutter/lib/models/cm_file_model.dart
index 064ce9d53..d372db6c3 100644
--- a/flutter/lib/models/cm_file_model.dart
+++ b/flutter/lib/models/cm_file_model.dart
@@ -14,8 +14,6 @@ class CmFileModel {
final _jobTables = HashMap<int, RxList<JobProgress>>.fromEntries([]);
Stopwatch stopwatch = Stopwatch();
int _lastElapsed = 0;
- bool _jobAdded = false;
- bool _showing = false;
CmFileModel(this.parent);
@@ -44,16 +42,6 @@ class CmFileModel {
_dealOneJob(d, calcSpeed);
}
currentJobTable.refresh();
- Future.delayed(Duration.zero, () async {
- if (_jobAdded) {
- _jobAdded = false;
- if (!_showing) {
- _showing = true;
- await gFFI.chatModel.showSidePage();
- _showing = false;
- }
- }
- });
} catch (e) {
debugPrint("onFileTransferLog:$e");
}
@@ -72,10 +60,10 @@ class CmFileModel {
if (job == null) {
job = JobProgress();
jobTable.add(job);
- _jobAdded = true;
final currentSelectedTab =
gFFI.serverModel.tabController.state.value.selectedTabInfo;
- if (currentSelectedTab.key != data.connId.toString()) {
+ if (!(gFFI.chatModel.isShowCMSidePage &&
+ currentSelectedTab.key == data.connId.toString())) {
client?.unreadChatMessageCount.value += 1;
}
}