opt set dyn react count

Signed-off-by: dom <githubaccount56556@proton.me>
This commit is contained in:
dom
2026-06-24 17:12:07 +08:00
parent 9d94c72e95
commit 735bb0ac23
2 changed files with 9 additions and 7 deletions

View File

@@ -25,7 +25,11 @@ class DynReactController
@override
bool customHandleResponse(bool isRefresh, Success<DynReactionData> response) {
if (isRefresh) {
count.value = response.response.total;
final res = response.response;
final total = res.total;
if (!(total == 0 && res.items?.isNotEmpty == true)) {
count.value = total;
}
}
return false;
}

View File

@@ -152,18 +152,16 @@ class _UpPanelState extends State<UpPanel> {
Widget avatar;
if (isAll) {
avatar = DecoratedBox(
decoration: BoxDecoration(
decoration: const BoxDecoration(
shape: .circle,
border: Border.all(
width: 5,
color: const Color(0xFF5CB67B),
),
color: Color(0xFF5CB67B),
),
child: Image.asset(
width: 38,
height: 38,
cacheWidth: 38.cacheSize(context),
Assets.logo,
Assets.logo2,
color: Colors.white,
),
);
} else {