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

Bug: In updateAlarmProfiles function, currentProfile variable not utilized in logic #673

Open
abhivyakti2 opened this issue Feb 12, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@abhivyakti2
Copy link

abhivyakti2 commented Feb 12, 2025

Description

Title: Refactor and Improve Usage of currentProfile in Alarm Profile Update Logic

Description:

I would like to raise an issue regarding the current implementation of the currentProfile variable in the alarm profile update logic. In updateAlarmProfiles, currentProfileName is fetched using storage.readProfile() and is used directly to filter alarms for updating. However, the variable currentProfile is declared using IsarDb.getProfile(currentProfileName) but is not utilized anywhere in the function. This creates unnecessary ambiguity and potential redundancy.

Suggested Solution:

  • Refactor the function to use currentProfile to validate the existence of the profile before proceeding with updates.

Impact:

  • Leaving unused or redundant variables in the codebase reduces maintainability and introduces unnecessary complexity. Ensuring clarity in the logic for updating alarm profiles will improve the quality of the code.

Request:

I would like to request the maintainers to assign this issue to me. I can work on refactoring this function to ensure a cleaner and more consistent implementation.

Thank you for your time and consideration!

Screenshots

Image

@abhivyakti2 abhivyakti2 added the bug Something isn't working label Feb 12, 2025
@Aditya-Thakur-369
Copy link

Hi @abhivyakti2 ,

I’d like to fix Bug #673 by refactoring updateAlarmProfiles to utilize currentProfile properly. Can you please assign this to me? Thanks!

Best,

@MarkisDev MarkisDev added enhancement New feature or request good first issue Good for newcomers and removed bug Something isn't working labels Mar 1, 2025
@MarkisDev
Copy link
Collaborator

I have assigned this issue to you, you can refactor it. @abhivyakti2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants