not pop up cm for file log
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
91decea302
commit
db66ffc868
@ -73,7 +73,7 @@ class ChatModel with ChangeNotifier {
|
|||||||
|
|
||||||
Offset chatWindowPosition = Offset(20, 80);
|
Offset chatWindowPosition = Offset(20, 80);
|
||||||
|
|
||||||
void setChatWindowPosition(Offset position) {
|
void setChatWindowPosition(Offset position) {
|
||||||
chatWindowPosition = position;
|
chatWindowPosition = position;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
@ -278,16 +278,6 @@ class ChatModel with ChangeNotifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showSidePage() async {
|
|
||||||
if (isDesktop) {
|
|
||||||
if (isConnManager) {
|
|
||||||
if (!_isShowCMSidePage) {
|
|
||||||
await toggleCMSidePage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
toggleCMChatPage(MessageKey key) async {
|
toggleCMChatPage(MessageKey key) async {
|
||||||
if (gFFI.chatModel.currentKey != key) {
|
if (gFFI.chatModel.currentKey != key) {
|
||||||
gFFI.chatModel.changeCurrentKey(key);
|
gFFI.chatModel.changeCurrentKey(key);
|
||||||
|
@ -14,8 +14,6 @@ class CmFileModel {
|
|||||||
final _jobTables = HashMap<int, RxList<JobProgress>>.fromEntries([]);
|
final _jobTables = HashMap<int, RxList<JobProgress>>.fromEntries([]);
|
||||||
Stopwatch stopwatch = Stopwatch();
|
Stopwatch stopwatch = Stopwatch();
|
||||||
int _lastElapsed = 0;
|
int _lastElapsed = 0;
|
||||||
bool _jobAdded = false;
|
|
||||||
bool _showing = false;
|
|
||||||
|
|
||||||
CmFileModel(this.parent);
|
CmFileModel(this.parent);
|
||||||
|
|
||||||
@ -44,16 +42,6 @@ class CmFileModel {
|
|||||||
_dealOneJob(d, calcSpeed);
|
_dealOneJob(d, calcSpeed);
|
||||||
}
|
}
|
||||||
currentJobTable.refresh();
|
currentJobTable.refresh();
|
||||||
Future.delayed(Duration.zero, () async {
|
|
||||||
if (_jobAdded) {
|
|
||||||
_jobAdded = false;
|
|
||||||
if (!_showing) {
|
|
||||||
_showing = true;
|
|
||||||
await gFFI.chatModel.showSidePage();
|
|
||||||
_showing = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
debugPrint("onFileTransferLog:$e");
|
debugPrint("onFileTransferLog:$e");
|
||||||
}
|
}
|
||||||
@ -72,10 +60,10 @@ class CmFileModel {
|
|||||||
if (job == null) {
|
if (job == null) {
|
||||||
job = JobProgress();
|
job = JobProgress();
|
||||||
jobTable.add(job);
|
jobTable.add(job);
|
||||||
_jobAdded = true;
|
|
||||||
final currentSelectedTab =
|
final currentSelectedTab =
|
||||||
gFFI.serverModel.tabController.state.value.selectedTabInfo;
|
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;
|
client?.unreadChatMessageCount.value += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user