mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-15 18:11:27 +03:00
when remote page receive chat message: if minimized, top page and switch tab, otherwise add unread message count
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -2140,3 +2140,20 @@ Widget buildRemoteBlock({required Widget child, WhetherUseRemoteBlock? use}) {
|
||||
]),
|
||||
));
|
||||
}
|
||||
|
||||
Widget unreadMessageCountBuilder(RxInt? count) {
|
||||
return Obx(() => Offstage(
|
||||
offstage: !((count?.value ?? 0) > 0),
|
||||
child: Container(
|
||||
width: 16,
|
||||
height: 16,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
child: Center(
|
||||
child: Text("${count?.value ?? 0}",
|
||||
maxLines: 1, style: TextStyle(color: Colors.white, fontSize: 10)),
|
||||
),
|
||||
).marginOnly(left: 4)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user