mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
fix: Exit early in permission request for iOS and Android in NotificationService
This commit is contained in:
@@ -5,22 +5,22 @@
|
||||
|
||||
|
||||
|
||||
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000202">
|
||||
<testcase classname="fastlane.lanes" name="0: default_platform" time="0.000193">
|
||||
|
||||
</testcase>
|
||||
|
||||
|
||||
<testcase classname="fastlane.lanes" name="1: increment_build_number" time="0.261599">
|
||||
<testcase classname="fastlane.lanes" name="1: increment_build_number" time="6.996338">
|
||||
|
||||
</testcase>
|
||||
|
||||
|
||||
<testcase classname="fastlane.lanes" name="2: build_app" time="121.524995">
|
||||
<testcase classname="fastlane.lanes" name="2: build_app" time="129.479733">
|
||||
|
||||
</testcase>
|
||||
|
||||
|
||||
<testcase classname="fastlane.lanes" name="3: upload_to_testflight" time="321.749799">
|
||||
<testcase classname="fastlane.lanes" name="3: upload_to_testflight" time="333.229336">
|
||||
|
||||
</testcase>
|
||||
|
||||
|
||||
@@ -101,6 +101,7 @@ class NotificationService {
|
||||
debugPrint(
|
||||
'📱 [NotificationService] iOS permissions granted: $_permissionGranted',
|
||||
);
|
||||
return; // Exit early if on iOS
|
||||
}
|
||||
|
||||
// Android 13+ permissions
|
||||
@@ -114,7 +115,15 @@ class NotificationService {
|
||||
debugPrint(
|
||||
'🤖 [NotificationService] Android permissions granted: $_permissionGranted',
|
||||
);
|
||||
return; // Exit early if on Android
|
||||
}
|
||||
|
||||
// If neither platform plugin is available, assume permissions are granted
|
||||
// This handles older Android versions that don't require runtime permissions
|
||||
_permissionGranted = true;
|
||||
debugPrint(
|
||||
'✅ [NotificationService] No platform plugin found, assuming permissions granted',
|
||||
);
|
||||
} catch (e) {
|
||||
debugPrint('⚠️ [NotificationService] Error requesting permissions: $e');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user