Skip to content

Allow configurable snooze duration using SharedPreferences#10

Open
Apprentice2907 wants to merge 1 commit into
CCExtractor:mainfrom
Apprentice2907:custom-snooze-duration
Open

Allow configurable snooze duration using SharedPreferences#10
Apprentice2907 wants to merge 1 commit into
CCExtractor:mainfrom
Apprentice2907:custom-snooze-duration

Conversation

@Apprentice2907
Copy link
Copy Markdown

Description

This pull request removes the hardcoded snooze duration and introduces a configurable snooze duration using Android SharedPreferences. The default behavior remains unchanged (5 minutes), while allowing future customization.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (code improvement/cleanup without logical changes)
  • UI/Design change

Proposed Changes

  • Removed the hardcoded snooze duration in AlarmSnoozeReceiver
  • Added Preferences.kt to store and retrieve snooze duration using SharedPreferences
  • Preserved the default snooze duration of 5 minutes to maintain existing behavior

Fixes #(issue_no)

Replace issue_no with the issue number which is fixed in this PR
Fixes #5

Screenshots

Not applicable (logic-level change, no UI updates).

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

@Abhishek14104
Copy link
Copy Markdown
Collaborator

Thanks for the PR! I think it would be better to avoid using SharedPreferences here to prevent unnecessary global state and data fragmentation. Since we already have a DB setup, adding a new column/row to the existing table would be more consistent with the current architecture.

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.

New feature: Allow user to set custom snooze duration

2 participants