Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/react-native-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ on:
- '**.md'
- 'LICENSE'
- 'docs/**'
pull_request:
branches:
- main
- dev
workflow_dispatch:
inputs:
buildType:
Expand Down
1 change: 0 additions & 1 deletion app/(tabs)/shareintent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
import { useSession } from '@/components/AuthLayer';
import { useSafeAreaInsets } from 'react-native-safe-area-context';
import useFeeds from '@/hooks/useFeeds';
import { toast } from '@backpackapp-io/react-native-toast';
import { useToast } from '@/components/ToastUsage';

export default function ShareIntent() {
Expand Down
12 changes: 2 additions & 10 deletions components/AccessView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,16 @@ import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';
import { Text } from '@/components/ui/text';
import Button from '@/components/Button';
// import { Button } from "@/components/ui/button";
import { OtpInput } from 'react-native-otp-entry';
import { useMutation, useQuery } from '@tanstack/react-query';
import { authenticatingState } from '@/lib/state/auth';
import { useAtom, useAtomValue } from 'jotai';
import { supabase } from '@/lib/supabase';
import { colors } from '@/lib/colors';
import { Redirect, useRouter } from 'expo-router';
import { toast } from '@backpackapp-io/react-native-toast';
import { AndroidAutoSMSRef } from './AndroidAutoSMS';
import { LogBox } from 'react-native';
import { BottomSheetTextInput, BottomSheetView } from '@gorhom/bottom-sheet';
import { BottomSheetView } from '@gorhom/bottom-sheet';
import { RefObject } from 'react';
import {
showPhoneInputState,
showCountrySelectorState,
selectedCountryState,
} from './atom';
import { showPhoneInputState, showCountrySelectorState } from './atom';
import { FontSizes, useTheme } from '@/lib/theme';
import { BlurView } from 'expo-blur';
import CountrySelector from '@/components/CountrySelector';
Expand Down
2 changes: 1 addition & 1 deletion components/CameraPage/CaptureButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import Reanimated, {
import type { Camera, VideoFile } from 'react-native-vision-camera';
import { CAPTURE_BUTTON_SIZE } from './Constants';
import AsyncStorage from '@react-native-async-storage/async-storage';
import { toast } from '@backpackapp-io/react-native-toast';
import { useHaptics } from '@/lib/haptics';
import { useToast } from '../ToastUsage';
import { t } from '@/lib/i18n';
Expand Down Expand Up @@ -53,6 +52,7 @@ const _CaptureButton: React.FC<Props> = ({
const recordingProgress = useSharedValue(0);
const recordingTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
const haptic = useHaptics();
const { dismiss } = useToast();
useEffect(() => {
setRecordingTimeView(isRecording);

Expand Down
1 change: 0 additions & 1 deletion components/CameraPage/LiveStream.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
useRoom,
useRoomContext,
} from '@livekit/react-native';
import { toast } from '@backpackapp-io/react-native-toast';
import { Track, LocalVideoTrack } from 'livekit-client';
import { RoomControls } from './RoomControls';
// @ts-ignore
Expand Down
6 changes: 3 additions & 3 deletions components/CameraPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ import { usePreferredCameraDevice } from '../../hooks/usePreferredCameraDevice';
import { CaptureButton } from './CaptureButton';
import { useLocalSearchParams, useNavigation, useRouter } from 'expo-router';
import { CaptureButtonPhoto } from './CaptureButtonPhoto';
import { toast } from '@backpackapp-io/react-native-toast';
import { LiveButton } from './LiveButton';
import { t } from '@/lib/i18n';
import { useToast } from '../ToastUsage';

const ReanimatedCamera = Reanimated.createAnimatedComponent(Camera);
Reanimated.addWhitelistedNativeProps({
Expand Down Expand Up @@ -89,7 +89,7 @@ const CameraOverlay = Reanimated.createAnimatedComponent(View);
export default function CameraPage(): React.ReactElement {
const navigation = useNavigation();
const { feedId } = useLocalSearchParams();

const { dismiss } = useToast();
const [liveDescription, setLiveDescription] = useState('');

const shouldShowMediaTypeSwitch = true;
Expand Down Expand Up @@ -501,7 +501,7 @@ export default function CameraPage(): React.ReactElement {
<TouchableOpacity
style={styles.button}
onPress={() => {
toast.remove();
dismiss('all');
router.navigate({
pathname: '/(tabs)/(home)/[feedId]',
params: {
Expand Down
1 change: 0 additions & 1 deletion components/LocationFeed/RatePlace.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { toast } from '@backpackapp-io/react-native-toast';
import { ThumbsDown, X } from 'lucide-react-native';
import { Heart } from 'lucide-react-native';
import { TouchableOpacity, StyleSheet } from 'react-native';
Expand Down
1 change: 0 additions & 1 deletion components/MakePublic/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useState } from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { useMakePublicMutation } from '@/hooks/useMakePublicMutation';
import { toast } from '@backpackapp-io/react-native-toast';
import { useToast } from '../ToastUsage';
import { t } from '@/lib/i18n';

Expand Down
4 changes: 1 addition & 3 deletions components/SpacesBottomSheet/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
// @ts-nocheck
import React, { useCallback, useEffect } from 'react';
import React, { useCallback } from 'react';
import { BottomSheetFooter, BottomSheetModal } from '@gorhom/bottom-sheet';
import BottomSheet, { BottomSheetBackdrop } from '@gorhom/bottom-sheet';
import SpacesSheetHeader from './SpacesSheetHeader';
import { LiveKitRoom } from '@livekit/react-native';
import { toast } from '@backpackapp-io/react-native-toast';
import { useAtom } from 'jotai';
import { activeLivekitRoomState } from './atom';
import PresenceDialog from './Viewers';
Expand Down
6 changes: 3 additions & 3 deletions components/TakeVideo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ import { View, StyleSheet } from 'react-native';
import { useLocalSearchParams, useRouter } from 'expo-router';
import Ionicons from '@expo/vector-icons/Ionicons';
import { Button } from './ui/button';
import { toast } from '@backpackapp-io/react-native-toast';
import { useTheme } from '@/lib/theme';
import { useColorScheme } from '@/lib/useColorScheme';
import { useToast } from './ToastUsage';

export default function TakeVideo({ disabled }: { disabled: boolean }) {
const router = useRouter();
const { feedId } = useLocalSearchParams();
const theme = useTheme();
const { isDarkColorScheme } = useColorScheme();

const { dismiss } = useToast();
const onTakeVideoClick = async () => {
// Dismiss previous toasts if any
toast.dismiss();
dismiss('all');

try {
const cachedVideoPath = await AsyncStorage.getItem(
Expand Down
1 change: 0 additions & 1 deletion hooks/usePokeUser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useMutation, useQueryClient } from '@tanstack/react-query';
import { toast } from '@backpackapp-io/react-native-toast';
import { pokeUserLiveActionsPokeTargetUserIdPostMutation } from '@/lib/api/generated/@tanstack/react-query.gen';
import { useToast } from '@/components/ToastUsage';

Expand Down
3 changes: 0 additions & 3 deletions hooks/useSendPublicKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { useMutation } from '@tanstack/react-query';
import ProtocolService from '@/lib/services/ProtocolService';
import { publicKeyState } from '@/lib/state/auth';
import { useAtom } from 'jotai';
import { toast } from '@backpackapp-io/react-native-toast';
import { sendPublicKeyChatSendPublicKeyPostMutation } from '@/lib/api/generated/@tanstack/react-query.gen';
import { sendPublicKeyChatSendPublicKeyPost } from '@/lib/api/generated';

export default function useSendPublicKey() {
Expand All @@ -24,7 +22,6 @@ export default function useSendPublicKey() {
},
});

toast.dismiss('sending-public-key');
setPublicKey(identityKeyPair.publicKey);
},
});
Expand Down
12 changes: 6 additions & 6 deletions hooks/useUploadVideo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useAtom, useAtomValue } from 'jotai';
import { verificationRefetchIntervalState } from '@/lib/state/chat';
import { useRef } from 'react';
import { Alert } from 'react-native';
import { toast } from '@backpackapp-io/react-native-toast';
import useAuth from './useAuth';
import {
LocationFeedPost,
Expand All @@ -23,6 +22,7 @@ import {
import { formDataBodySerializer } from '@/lib/utils/form-data';
import { useToast } from '@/components/ToastUsage';
import { t } from '@/lib/i18n';
import { dismiss } from 'expo-router/build/global-state/routing';

export const useUploadVideo = ({
feedId,
Expand All @@ -48,7 +48,7 @@ export const useUploadVideo = ({

const { user } = useAuth();
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
const { success } = useToast();
const { success, dismiss } = useToast();

const uploadBlob = useMutation({
mutationKey: ['upload-blob', feedId, isPhoto],
Expand Down Expand Up @@ -157,9 +157,9 @@ export const useUploadVideo = ({
) => {
return index === 0
? {
...page,
data: [optimisticVerification, ...page.data],
}
...page,
data: [optimisticVerification, ...page.data],
}
: page;
},
),
Expand Down Expand Up @@ -191,7 +191,7 @@ export const useUploadVideo = ({
}
},
onError: (error) => {
toast.dismiss('upload-blob');
dismiss("all")
if (error) {
console.log('error', error);
Alert.alert(isPhoto ? 'ფოტო ვერ აიტვირთა' : 'ვიდეო ვერ აიტვირთა');
Expand Down
1 change: 0 additions & 1 deletion lib/haptics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as Device from 'expo-device';
import { impactAsync, ImpactFeedbackStyle } from 'expo-haptics';

import { isIOS, isWeb } from './platform';
import { toast } from '@backpackapp-io/react-native-toast';

export function useHaptics() {
return React.useCallback(
Expand Down
5 changes: 1 addition & 4 deletions lib/share.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Platform, Share } from 'react-native';
import { setStringAsync } from 'expo-clipboard';
import { isAndroid, isIOS } from '@/lib/platform';
import { toast } from '@backpackapp-io/react-native-toast';
import { ShareOptions } from 'react-native-share';
/**
* This function shares a URL using the native Share API if available, or copies it to the clipboard
Expand Down Expand Up @@ -42,8 +41,6 @@ export async function shareText(text: string) {
await Share.share({ message: text });
} else {
await setStringAsync(text);
toast('Copied to clipboard', {
id: 'clipboard-check',
});

}
}
Loading