From 84fe4fceb135334d05606c87e0f405a84902c6d4 Mon Sep 17 00:00:00 2001 From: phuoc Date: Fri, 8 Nov 2024 14:52:22 +0700 Subject: [PATCH] add comment, rename Signed-off-by: phuoc --- lib/service/announcement/announcement_service.dart | 1 + lib/service/customer_support_service.dart | 1 + lib/service/user_interactivity_service.dart | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/service/announcement/announcement_service.dart b/lib/service/announcement/announcement_service.dart index cb639ced0..4b90d3c7a 100644 --- a/lib/service/announcement/announcement_service.dart +++ b/lib/service/announcement/announcement_service.dart @@ -111,6 +111,7 @@ class AnnouncementServiceImpl implements AnnouncementService { await _saveAnnouncement(announcement.markAsRead()); } + /// unread and in-app enabled announcements List _getAnnouncementsToShow() { _queue.removeWhere((element) => element.read || !element.inAppEnabled); if (_queue.isEmpty) { diff --git a/lib/service/customer_support_service.dart b/lib/service/customer_support_service.dart index 727e30000..bb0870008 100644 --- a/lib/service/customer_support_service.dart +++ b/lib/service/customer_support_service.dart @@ -101,6 +101,7 @@ class CustomerSupportServiceImpl extends CustomerSupportService { bool _isProcessingDraftMessages = false; + /// will add this after backend support static const _supportChatNotificationTypes = []; Future> _getIssues() async { diff --git a/lib/service/user_interactivity_service.dart b/lib/service/user_interactivity_service.dart index c048a5619..514b252ba 100644 --- a/lib/service/user_interactivity_service.dart +++ b/lib/service/user_interactivity_service.dart @@ -30,10 +30,10 @@ class UserInteractivityServiceImpl implements UserInteractivityService { unawaited( _metricClientService.addEvent(MetricEventName.dailyLiked, data: data)); log.info('Liked daily work: ${dailyToken.tokenID}'); - await _likeDailyWorkActionResponse(); + await _countDailyLiked(); } - Future _likeDailyWorkActionResponse() async { + Future _countDailyLiked() async { final isNotificationEnabled = OneSignal.Notifications.permission; if (!isNotificationEnabled) { final likedCount = _configurationService.getDailyLikedCount();