about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-09-29 09:04:49 -0500
committerPaul Frazee <pfrazee@gmail.com>2022-09-29 09:04:49 -0500
commit16fbefc3546a31e173add2d068f8011db0091aca (patch)
tree305e52bf422bf6813ef824bafc410ac28556b686 /src
parentcb5a575bc85faa8ea6a8ecd556972f8cf06d8bb7 (diff)
downloadvoidsky-16fbefc3546a31e173add2d068f8011db0091aca.tar.zst
No visual feedback on FAB to reduce jank
Diffstat (limited to 'src')
-rw-r--r--src/view/com/util/FloatingActionButton.tsx37
1 files changed, 22 insertions, 15 deletions
diff --git a/src/view/com/util/FloatingActionButton.tsx b/src/view/com/util/FloatingActionButton.tsx
index bc16c0566..23a83b776 100644
--- a/src/view/com/util/FloatingActionButton.tsx
+++ b/src/view/com/util/FloatingActionButton.tsx
@@ -1,5 +1,10 @@
 import React from 'react'
-import {GestureResponderEvent, StyleSheet, TouchableOpacity} from 'react-native'
+import {
+  GestureResponderEvent,
+  StyleSheet,
+  TouchableWithoutFeedback,
+  View,
+} from 'react-native'
 import LinearGradient from 'react-native-linear-gradient'
 import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
 import {IconProp} from '@fortawesome/fontawesome-svg-core'
@@ -9,20 +14,22 @@ import * as zIndex from '../../lib/z-index'
 type OnPress = ((event: GestureResponderEvent) => void) | undefined
 export function FAB({icon, onPress}: {icon: IconProp; onPress: OnPress}) {
   return (
-    <TouchableOpacity style={styles.outer} onPress={onPress}>
-      <LinearGradient
-        colors={[gradients.primary.start, gradients.primary.end]}
-        start={{x: 0, y: 0}}
-        end={{x: 1, y: 1}}
-        style={styles.inner}>
-        <FontAwesomeIcon
-          size={24}
-          icon={icon}
-          color={colors.white}
-          style={styles.icon}
-        />
-      </LinearGradient>
-    </TouchableOpacity>
+    <TouchableWithoutFeedback onPress={onPress}>
+      <View style={styles.outer}>
+        <LinearGradient
+          colors={[gradients.primary.start, gradients.primary.end]}
+          start={{x: 0, y: 0}}
+          end={{x: 1, y: 1}}
+          style={styles.inner}>
+          <FontAwesomeIcon
+            size={24}
+            icon={icon}
+            color={colors.white}
+            style={styles.icon}
+          />
+        </LinearGradient>
+      </View>
+    </TouchableWithoutFeedback>
   )
 }