1
0
Fork 0

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

master
Kainalu Hagiwara 2020-08-03 14:22:06 -07:00 committed by Jeff Boek
parent f4296fb77e
commit 17bb010cc3
1 changed files with 4 additions and 4 deletions

View File

@ -251,10 +251,10 @@ class BrowserToolbarView(
} }
private fun ToolbarMenu.Item.performHapticIfNeeded(view: View) { private fun ToolbarMenu.Item.performHapticIfNeeded(view: View) {
(this as? ToolbarMenu.Item.Reload)?.also { reload -> if (this is ToolbarMenu.Item.Reload && this.bypassCache ||
if (reload.bypassCache) { this is ToolbarMenu.Item.Forward && this.viewHistory
view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS) ) {
} view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS)
} }
} }
} }