[fenix] For https://github.com/mozilla-mobile/fenix/issues/13235 - Add haptic feedback when long pressing forward button.

pull/600/head
Kainalu Hagiwara 4 years ago committed by Jeff Boek
parent 4fbb2e2fbb
commit 9b80ad8560

@ -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)
}
}
}

Loading…
Cancel
Save