Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial-functionality-of-permission-monitoring-machine #2

Merged
merged 8 commits into from
Mar 18, 2024

Commits on Mar 13, 2024

  1. build: Add xstate dependency

    Added xstate "^5.9.1" as a dependency in package.json for state management.
    technoplato committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    e99e0da View commit details
    Browse the repository at this point in the history
  2. feat(permission): Add permission monitoring machine

    Added a permission monitoring machine with states for idle, checkingPermission, permissionGranted, permissionDenied, and permissionRevoked. The machine includes logic to check permissions asynchronously and update the permission state accordingly. This will help in monitoring and handling permission changes in the application.
    technoplato committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    f773209 View commit details
    Browse the repository at this point in the history
  3. claude attempt 2

    technoplato committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    531d012 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2024

  1. feat: Restructure permission monitoring machine using setup from xs…

    …tate
    
    - Replaced `createMachine` with `setup` for defining the permissionMonitoringMachine
    - Updated the context and events types to include permissionStatuses and inc/dec events
    - Added increment and decrement actions for handling count updates
    - Changed the permissionState context to permissionStatuses using PermissionStatusMap
    - Updated the machine on events to trigger inc and dec actions
    
    This commit enhances the readability and organization of the permission monitoring machine by utilizing xstate's `setup` function.
    technoplato committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    eaa64e3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e375f29 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    93caf50 View commit details
    Browse the repository at this point in the history
  4. feat: Add initial tests and setup for Permission Monitoring Machine

    Test is logging out the correct result but failing for some reason...
    
    - Added initial test cases to check the starting state and permission checking functionality in the Permission Monitoring Machine.
    - Introduced constants for permissions, permission statuses, and machine states.
    - Defined context, events, and actions for the Permission Monitoring Machine setup.
    - Implemented actors for subscribing to application lifecycle events and checking Bluetooth permission status.
    technoplato committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    cca72ab View commit details
    Browse the repository at this point in the history
  5. feat: Add async/await to permission check in Permission Monitoring Ma…

    …chine
    
    Updated the test case in the Permission Monitoring Machine to include async/await
    when checking permissions once invoked. This change was necessary to properly
    handle the asynchronous nature of the permission check operation. This ensures
    that the test case waits for the permission check to be completed before
    continuing, providing accurate results.
    technoplato committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    800eb9e View commit details
    Browse the repository at this point in the history