|
@@ -45,6 +45,8 @@ class HomePage extends HookConsumerWidget {
|
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
|
final viewModel = ref.read(homeViewModelProvider.notifier);
|
|
|
final state = ref.watch(homeViewModelProvider);
|
|
|
+ String? notificationCount = UserConfigService.getState(ref: ref).user?.unreadNotificationsCount;
|
|
|
+
|
|
|
final bannerIndex = useState(0);
|
|
|
|
|
|
useEffect(() {
|
|
@@ -121,11 +123,10 @@ class HomePage extends HookConsumerWidget {
|
|
|
left: 0,
|
|
|
top: 0,
|
|
|
child: Visibility(
|
|
|
- visible: UserConfigService.getState(ref: ref).user?.unreadNotificationsCount != null,
|
|
|
+ visible: notificationCount != null && notificationCount != "0",
|
|
|
child: Transform.translate(
|
|
|
offset: const Offset(-10, -5),
|
|
|
- child: MyTextView(
|
|
|
- UserConfigService.getState(ref: ref).user?.unreadNotificationsCount ?? "0",
|
|
|
+ child: MyTextView(notificationCount ?? "0",
|
|
|
boxWidth: 20.0,
|
|
|
textColor: Colors.white,
|
|
|
fontSize: 10,
|