Skip to content

fix: add snackbar feedback and reset toggle state when guardian permi…#889

Open
vibhutomer wants to merge 1 commit intoCCExtractor:mainfrom
vibhutomer:fix-guardian-permissions
Open

fix: add snackbar feedback and reset toggle state when guardian permi…#889
vibhutomer wants to merge 1 commit intoCCExtractor:mainfrom
vibhutomer:fix-guardian-permissions

Conversation

@vibhutomer
Copy link

Description

This PR addresses a critical UX flaw in the Guardian Angel feature. Previously, if a user toggled the feature "On" but denied the subsequent OS permission requests (Phone and SMS), the app failed silently. The UI switch remained in the active state, creating a false impression that the safety feature was armed.

Proposed Changes

  • Added an else block to the permission check in lib/app/modules/addOrUpdateAlarm/views/guardian_angel.dart.
  • The state of the toggle is now programmatically reverted (controller.isGuardian.value = false) if permissions are denied.
  • Added a Get.snackbar to provide clear, immediate feedback to the user explaining why the feature cannot be activated.

Fixes #888

Screenshots

2ndIssue

Checklist

  • Tests have been added or updated to cover the changes
  • Documentation has been updated to reflect the changes
  • Code follows the established coding style guidelines
  • All tests are passing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Guardian Angel feature fails silently and maintains incorrect UI state when permissions are denied

1 participant