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

feat(mobile): Add haptic feedback to asset grid #5344

Merged

Conversation

l0nax
Copy link
Contributor

@l0nax l0nax commented Nov 27, 2023

Add haptic feedback when jumping from one month to another in the asset grid view.
The feedback is similar to the one implemented in the Google Photos app.

Closes #5342

@martyfuhry
Copy link
Contributor

It looks like the added code will run inside of a function which is responsible for building a widget component. I would instead, attach a listener to a relevant notifier and move this functionality inside of the listener.

For example, a ScrollView will have a ScrollController which notifies listeners whenever it scrolls. For this functionality, I would use the ItemPositionsListener:

void initState() {
  ...
  _itemPositionsListener.itemPositions.addListener(_addHapticsWhenChangingMonth);
}

...

void _addHapticsWhenChangingMonth() {
  // Put the code here
}

@l0nax l0nax force-pushed the add-haptic-feedback-to-asset-grid-view branch 2 times, most recently from 7c85040 to 9c0b0e1 Compare November 29, 2023 20:12
@l0nax l0nax requested a review from fyfrey November 29, 2023 20:12
@l0nax l0nax force-pushed the add-haptic-feedback-to-asset-grid-view branch from 9c0b0e1 to 14884a9 Compare December 1, 2023 16:55
Add a haptic feedback when jumping from one month to another in the
asset grid view.
The feedback is similar to the one implemented in the Google Photos app.
@l0nax l0nax force-pushed the add-haptic-feedback-to-asset-grid-view branch from 14884a9 to 2354016 Compare December 1, 2023 16:57
@alextran1502 alextran1502 enabled auto-merge (squash) February 5, 2024 03:02
@alextran1502 alextran1502 merged commit f4ab5d3 into immich-app:main Feb 5, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants