A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
mobile: fix toast not hiding on tap
ammarahm-ed16915494d8fc
diff --git a/apps/mobile/app/components/toast/index.js b/apps/mobile/app/components/toast/index.jsindex 29b1b4e85..38d631392 100644--- a/apps/mobile/app/components/toast/index.js+++ b/apps/mobile/app/components/toast/index.js@@ -18,8 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/import React, { useCallback, useEffect, useRef, useState } from "react";-import { Keyboard, View } from "react-native";-import Animated, { FadeInUp, FadeOutUp } from "react-native-reanimated";+import { Keyboard, TouchableOpacity, View } from "react-native";import Icon from "react-native-vector-icons/MaterialCommunityIcons";import { notesnook } from "../../../e2e/test.ids";import useGlobalSafeAreaInsets from "../../hooks/use-global-safe-area-insets";@@ -136,15 +135,14 @@ export const Toast = ({ context = "global" }) => {return (visible && (- <Animated.View- onTouchEnd={() => {- if (!data.func) {- if (hideTimeout.current) {- clearTimeout(hideTimeout.current);- }- hideToastFunc();+ <TouchableOpacity+ onPress={() => {+ if (hideTimeout.current) {+ clearTimeout(hideTimeout.current);}+ hideToastFunc();}}+ activeOpacity={1}style={{width: DDS.isTab ? 400 : "100%",alignItems: "center",@@ -156,9 +154,7 @@ export const Toast = ({ context = "global" }) => {elevation: 15}}>- <Animated.View- entering={FadeInUp.springify()}- exiting={FadeOutUp}+ <Viewstyle={{...getElevation(5),maxWidth: "95%",@@ -250,8 +246,8 @@ export const Toast = ({ context = "global" }) => {}}/>) : null}- </Animated.View>- </Animated.View>+ </View>+ </TouchableOpacity>));};