not pop up cm for file log

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-09-08 09:05:07 +08:00
parent 91decea302
commit db66ffc868
2 changed files with 3 additions and 25 deletions

View File

@ -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);

View File

@ -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;
}
}