feat: 알림 재예약 개선과 패키지 업그레이드
This commit is contained in:
@@ -114,6 +114,23 @@ class NotificationProvider extends ChangeNotifier {
|
||||
|
||||
// 알림이 활성화된 경우에만 알림 재예약 (비활성화 시에는 필요 없음)
|
||||
if (value) {
|
||||
final hasPermission = await NotificationService.checkPermission();
|
||||
if (!hasPermission) {
|
||||
final granted = await NotificationService.requestPermission();
|
||||
if (!granted) {
|
||||
debugPrint('알림 권한이 부여되지 않았습니다. 일부 알림이 제한될 수 있습니다.');
|
||||
}
|
||||
}
|
||||
|
||||
final canExact = await NotificationService.canScheduleExactAlarms();
|
||||
if (!canExact) {
|
||||
final exactGranted =
|
||||
await NotificationService.requestExactAlarmsPermission();
|
||||
if (!exactGranted) {
|
||||
debugPrint('정확 알람 권한이 없어 근사 알림으로 예약됩니다.');
|
||||
}
|
||||
}
|
||||
|
||||
// 알림 설정 변경 시 모든 구독의 알림 재예약
|
||||
// 지연 실행으로 UI 응답성 향상
|
||||
Future.microtask(() => _rescheduleNotificationsIfNeeded());
|
||||
|
||||
Reference in New Issue
Block a user