Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): move Android undo toasts above bottom navigation #23928

MergedPixPMusic(GitHub profile, opens in a new tab)merged 5 commits intomain fromrefs/pull/23928/headmerged by juliusmarminge View on GitHub

Showing 1 changed file with 128 additions and 0 deletions.

x
0 of 1 viewed, 1 left
128 additions and 0 deletionsapps/mobile/src/features/home/ThreadUndoNotice.android.tsxAdded
View file
@@ -0,0 +1,128 @@
+import { useLayoutEffect, useState } from "react";
+import { StyleSheet, View } from "react-native";
+import { GestureDetector, usePanGesture } from "react-native-gesture-handler";
+import Animated, {
+ cancelAnimation,
+ Easing,
+ FadeOut,
+ ReduceMotion,
+ runOnJS,
+ useAnimatedStyle,
+ useSharedValue,
+ withTiming,
+ type EntryAnimationsValues,
+} from "react-native-reanimated";
+import { useSafeAreaInsets } from "react-native-safe-area-context";
+import { Toast } from "../../components/ui/Toast";
+import { MOBILE_MOTION } from "../../lib/designTokens";
+import {
+ dismissThreadUndoNotice,
+ readThreadUndoNotice,
+ useThreadUndoNotice,
+} from "./thread-undo-notice";
+​
+const SWIPE_TIMING = { duration: 160, reduceMotion: ReduceMotion.System };
+const ENTER_TIMING = {
+ duration: MOBILE_MOTION.enter,
+ easing: Easing.out(Easing.cubic),
+ reduceMotion: ReduceMotion.System,
+};
+const NOTICE_EXITING = FadeOut.duration(MOBILE_MOTION.exit).reduceMotion(ReduceMotion.System);