Skip to content

[feat] Add haptic feedback#5380

Merged
Frenzie merged 1 commit intokoreader:masterfrom
Frenzie:haptic
Sep 29, 2019
Merged

[feat] Add haptic feedback#5380
Frenzie merged 1 commit intokoreader:masterfrom
Frenzie:haptic

Conversation

@Frenzie
Copy link
Copy Markdown
Member

@Frenzie Frenzie commented Sep 15, 2019

References #5374.


@pazos This reflects my basic thought process on how to implement this. Most actions wouldn't do anything of course, basically just keyboard & hold. In using performHapticFeedback it would be up to the system whether it wants to do anything with it.

@Frenzie Frenzie added this to the 2019.10 milestone Sep 15, 2019
@Frenzie Frenzie requested a review from pazos September 15, 2019 10:47
end

function ReaderStatus:onEndOfBook()
if Device:isHapticFeedbackEnabled() then
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I think it's probably more elegant if this just reads Device:performHapticFeedback("CONTEXT_CLICK").

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You mean fold the cap check inside performHaptic*?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Exactly. It already defaults as a no-op anyway and this way it just adds a lot of extra boilerplate.

@Frenzie Frenzie merged commit f7861bc into koreader:master Sep 29, 2019
@Frenzie Frenzie deleted the haptic branch September 29, 2019 13:42
@Frenzie
Copy link
Copy Markdown
Member Author

Frenzie commented Sep 29, 2019

Merging now. The API can be adjusted if other platforms require it.

mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
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.

2 participants