Skip to content

Add haptic feedback toggle for code refresh#1599

Merged
alexbakker merged 1 commit intobeemdevelopment:masterfrom
michaelschattgen:feature/haptic-feedback
May 29, 2025
Merged

Add haptic feedback toggle for code refresh#1599
alexbakker merged 1 commit intobeemdevelopment:masterfrom
michaelschattgen:feature/haptic-feedback

Conversation

@michaelschattgen
Copy link
Member

This PR adds the ability to enable/disable haptic feedback when the codes are about to expire or when they refresh.

Copy link
Member

@alexbakker alexbakker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat! I like this more than I thought I would. I have a couple of comments.

@michaelschattgen michaelschattgen force-pushed the feature/haptic-feedback branch 3 times, most recently from 42ea9df to 79c6fdc Compare April 23, 2025 15:56
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the fix for the animation-related crash for entries that have a period of 7 is not included here. Do you want to create a separate PR for that?

public void onRefresh() {
refresh(false);

if (_recyclerView.isShown()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this check now that we stop the refresher when the activity is not visible?

_refresher.stop();
}

public void onRefreshStart() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're now unconditionally starting the refresher from MainActivity, I think we need to check whether _adapter.getMostFrequentPeriod() returns -1 here and if so not start the refresher. Otherwise, this causes a tight loop in the refresher in case there are no entries in the vault yet. This is also the reason why the instrumented tests are failing.

Improve haptic feedback logic
@alexbakker alexbakker merged commit 6f27014 into beemdevelopment:master May 29, 2025
4 checks passed
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.

2 participants