fix cm unread and add vertical divider
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
685d960b1e
commit
b0f22d8693
@ -104,6 +104,12 @@ class ConnectionManagerState extends State<ConnectionManager> {
|
||||
final client =
|
||||
gFFI.serverModel.clients.firstWhereOrNull((e) => e.id == client_id);
|
||||
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));
|
||||
}
|
||||
}
|
||||
@ -168,7 +174,13 @@ class ConnectionManagerState extends State<ConnectionManager> {
|
||||
builder: (_, model, child) => model.isShowCMChatPage
|
||||
? Expanded(
|
||||
child: buildRemoteBlock(
|
||||
child: ChatPage(),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
right: BorderSide(
|
||||
color: Theme.of(context)
|
||||
.dividerColor))),
|
||||
child: ChatPage()),
|
||||
),
|
||||
flex: (kConnectionManagerWindowSizeOpenChat.width -
|
||||
kConnectionManagerWindowSizeClosedChat
|
||||
|
@ -462,13 +462,7 @@ class ServerModel with ChangeNotifier {
|
||||
key: client.id.toString(),
|
||||
label: client.name,
|
||||
closable: false,
|
||||
onTap: () {
|
||||
if (client.unreadChatMessageCount.value > 0) {
|
||||
client.unreadChatMessageCount.value = 0;
|
||||
final chatModel = parent.target!.chatModel;
|
||||
chatModel.showChatPage(client.id);
|
||||
}
|
||||
},
|
||||
onTap: () {},
|
||||
page: desktop.buildConnectionCard(client)));
|
||||
Future.delayed(Duration.zero, () async {
|
||||
if (!hideCm) window_on_top(null);
|
||||
|
Loading…
Reference in New Issue
Block a user