mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-11 18:47:47 +00:00
add file log page to cm
* Only send and receive logs are shown * For older version, client send to server doesn't have size information, because server side doesn't know the total_size * Not switch tabs automatically when new files are transferred * If cm side page is open, not pop up automatically when new files are transferred * Show unread message count * The cm tab remains open when closed if a file transfer has previously occurred Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -86,13 +86,13 @@ class ChatModel with ChangeNotifier {
|
||||
late final Map<MessageKey, MessageBody> _messages = {};
|
||||
|
||||
MessageKey _currentKey = MessageKey('', -2); // -2 is invalid value
|
||||
late bool _isShowCMChatPage = false;
|
||||
late bool _isShowCMSidePage = false;
|
||||
|
||||
Map<MessageKey, MessageBody> get messages => _messages;
|
||||
|
||||
MessageKey get currentKey => _currentKey;
|
||||
|
||||
bool get isShowCMChatPage => _isShowCMChatPage;
|
||||
bool get isShowCMSidePage => _isShowCMSidePage;
|
||||
|
||||
void setOverlayState(BlockableOverlayState blockableOverlayState) {
|
||||
_blockableOverlayState = blockableOverlayState;
|
||||
@@ -255,7 +255,7 @@ class ChatModel with ChangeNotifier {
|
||||
showChatPage(MessageKey key) async {
|
||||
if (isDesktop) {
|
||||
if (isConnManager) {
|
||||
if (!_isShowCMChatPage) {
|
||||
if (!_isShowCMSidePage) {
|
||||
await toggleCMChatPage(key);
|
||||
}
|
||||
} else {
|
||||
@@ -272,12 +272,26 @@ 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);
|
||||
}
|
||||
if (_isShowCMChatPage) {
|
||||
_isShowCMChatPage = !_isShowCMChatPage;
|
||||
await toggleCMSidePage();
|
||||
}
|
||||
|
||||
toggleCMSidePage() async {
|
||||
if (_isShowCMSidePage) {
|
||||
_isShowCMSidePage = !_isShowCMSidePage;
|
||||
notifyListeners();
|
||||
await windowManager.show();
|
||||
await windowManager.setSizeAlignment(
|
||||
@@ -287,7 +301,7 @@ class ChatModel with ChangeNotifier {
|
||||
await windowManager.show();
|
||||
await windowManager.setSizeAlignment(
|
||||
kConnectionManagerWindowSizeOpenChat, Alignment.topRight);
|
||||
_isShowCMChatPage = !_isShowCMChatPage;
|
||||
_isShowCMSidePage = !_isShowCMSidePage;
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user