Merge pull request #4934 from 21pages/fix_chat

opt mobile chat page
This commit is contained in:
RustDesk
2023-07-10 13:27:09 +08:00
committed by GitHub
11 changed files with 222 additions and 76 deletions

View File

@@ -2193,19 +2193,21 @@ Widget buildRemoteBlock({required Widget child, WhetherUseRemoteBlock? use}) {
));
}
Widget unreadMessageCountBuilder(RxInt? count) {
Widget unreadMessageCountBuilder(RxInt? count,
{double? size, double? fontSize, double? marginLeft}) {
return Obx(() => Offstage(
offstage: !((count?.value ?? 0) > 0),
child: Container(
width: 16,
height: 16,
width: size ?? 16,
height: size ?? 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)),
maxLines: 1,
style: TextStyle(color: Colors.white, fontSize: fontSize ?? 10)),
),
).marginOnly(left: 4)));
).marginOnly(left: marginLeft ?? 4)));
}