commit
91c53b1db4
@ -104,6 +104,12 @@ class ConnectionManagerState extends State<ConnectionManager> {
|
|||||||
final client =
|
final client =
|
||||||
gFFI.serverModel.clients.firstWhereOrNull((e) => e.id == client_id);
|
gFFI.serverModel.clients.firstWhereOrNull((e) => e.id == client_id);
|
||||||
if (client != null) {
|
if (client != null) {
|
||||||
|
if (client.unreadChatMessageCount.value > 0) {
|
||||||
|
Future.delayed(Duration.zero, () {
|
||||||
|
client.unreadChatMessageCount.value = 0;
|
||||||
|
gFFI.chatModel.showChatPage(client.id);
|
||||||
|
});
|
||||||
|
}
|
||||||
windowManager.setTitle(getWindowNameWithId(client.peerId));
|
windowManager.setTitle(getWindowNameWithId(client.peerId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -168,7 +174,13 @@ class ConnectionManagerState extends State<ConnectionManager> {
|
|||||||
builder: (_, model, child) => model.isShowCMChatPage
|
builder: (_, model, child) => model.isShowCMChatPage
|
||||||
? Expanded(
|
? Expanded(
|
||||||
child: buildRemoteBlock(
|
child: buildRemoteBlock(
|
||||||
child: ChatPage(),
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(
|
||||||
|
right: BorderSide(
|
||||||
|
color: Theme.of(context)
|
||||||
|
.dividerColor))),
|
||||||
|
child: ChatPage()),
|
||||||
),
|
),
|
||||||
flex: (kConnectionManagerWindowSizeOpenChat.width -
|
flex: (kConnectionManagerWindowSizeOpenChat.width -
|
||||||
kConnectionManagerWindowSizeClosedChat
|
kConnectionManagerWindowSizeClosedChat
|
||||||
|
@ -234,13 +234,21 @@ class ChatModel with ChangeNotifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
showChatPage(int id) async {
|
showChatPage(int id) async {
|
||||||
if (isConnManager) {
|
if (isDesktop) {
|
||||||
if (!_isShowCMChatPage) {
|
if (isConnManager) {
|
||||||
await toggleCMChatPage(id);
|
if (!_isShowCMChatPage) {
|
||||||
|
await toggleCMChatPage(id);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (_isChatOverlayHide()) {
|
||||||
|
await toggleChatOverlay();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (_isChatOverlayHide()) {
|
if (id == clientModeID) {
|
||||||
await toggleChatOverlay();
|
if (_isChatOverlayHide()) {
|
||||||
|
await toggleChatOverlay();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -462,13 +462,7 @@ class ServerModel with ChangeNotifier {
|
|||||||
key: client.id.toString(),
|
key: client.id.toString(),
|
||||||
label: client.name,
|
label: client.name,
|
||||||
closable: false,
|
closable: false,
|
||||||
onTap: () {
|
onTap: () {},
|
||||||
if (client.unreadChatMessageCount.value > 0) {
|
|
||||||
client.unreadChatMessageCount.value = 0;
|
|
||||||
final chatModel = parent.target!.chatModel;
|
|
||||||
chatModel.showChatPage(client.id);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
page: desktop.buildConnectionCard(client)));
|
page: desktop.buildConnectionCard(client)));
|
||||||
Future.delayed(Duration.zero, () async {
|
Future.delayed(Duration.zero, () async {
|
||||||
if (!hideCm) window_on_top(null);
|
if (!hideCm) window_on_top(null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user