GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit 7286c322 authored by Kainalu Hagiwara's avatar Kainalu Hagiwara Committed by liuche
Browse files

For #13235 - Add haptic feedback when long pressing forward button.

parent f6b84ce7
......@@ -251,10 +251,10 @@ class BrowserToolbarView(
}
private fun ToolbarMenu.Item.performHapticIfNeeded(view: View) {
(this as? ToolbarMenu.Item.Reload)?.also { reload ->
if (reload.bypassCache) {
view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
}
if (this is ToolbarMenu.Item.Reload && this.bypassCache ||
this is ToolbarMenu.Item.Forward && this.viewHistory
) {
view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment