From 4426eef2dc6852f81ab135ae0efa747d306d4a92 Mon Sep 17 00:00:00 2001 From: Username1548 Date: Tue, 8 Jul 2025 21:19:33 +0700 Subject: [PATCH] fix(notifications): fixed wrong notifications rendring and changed requested pagination page --- .../notifications_cubit/notifications_cubit.dart | 2 +- .../presentation/widgets/notification_widget.dart | 8 ++++---- lib/l10n/intl_en.arb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/features/notifications/presentation/notifications_cubit/notifications_cubit.dart b/lib/features/notifications/presentation/notifications_cubit/notifications_cubit.dart index b7822d46..16cf1f40 100644 --- a/lib/features/notifications/presentation/notifications_cubit/notifications_cubit.dart +++ b/lib/features/notifications/presentation/notifications_cubit/notifications_cubit.dart @@ -66,7 +66,7 @@ class NotificationsCubit extends Cubit { Future getNotifications() async { try { - final notifications = await notificationsRepository.getNotifications(page: 2); + final notifications = await notificationsRepository.getNotifications(page: 1); _notifications.clear(); _notifications.addAll(notifications ?? []); emit( diff --git a/lib/features/notifications/presentation/widgets/notification_widget.dart b/lib/features/notifications/presentation/widgets/notification_widget.dart index 4ff0faff..83157593 100644 --- a/lib/features/notifications/presentation/widgets/notification_widget.dart +++ b/lib/features/notifications/presentation/widgets/notification_widget.dart @@ -67,7 +67,7 @@ class _PlanSubscriptionStartedToAuthorWidget extends StatelessWidget { return _BaseNotificationWidget( isRead: notification.isRead, - notificationsText: s.fillYasterday, + notificationsText: s.userSubscribedToPlan(notification.customerName, notification.planName), ); } } @@ -81,7 +81,7 @@ class _PlanSubscriptionCanceledToAuthorWidget extends StatelessWidget { return _BaseNotificationWidget( isRead: notification.isRead, - notificationsText: s.fillYasterday, + notificationsText: s.userCanceldThePlanSubscription(notification.customerName, notification.planName), ); } } @@ -95,7 +95,7 @@ class _ChosenPlanStartedToClientWidget extends StatelessWidget { return _BaseNotificationWidget( isRead: notification.isRead, - notificationsText: s.fillYasterday, + notificationsText: s.planStarted(notification.planName), ); } } @@ -109,7 +109,7 @@ class _ChosenPlanTomorrowReminderToClientWidget extends StatelessWidget { return _BaseNotificationWidget( isRead: notification.isRead, - notificationsText: s.fillYasterday, + notificationsText: s.tomorrowYourPlanWillStart(notification.planName), ); } } diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 96ddc4be..ca980067 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -402,6 +402,6 @@ "allowAcessToGaleryDescription": "Предоставление доступа позволит вам добавлять фото к записям", "allowAccessToCamera": "Разрешите доступ к камере", "allowAccessToCameraDescription": "Предоставление доступа позволит вам делать фотографии и добавлять к записям", - "allowAccess": "Разрешить доступ" + "allowAccess": "Разрешить доступ" }