about summary refs log tree commit diff
path: root/src/view/com/lightbox
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/lightbox')
-rw-r--r--src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx6
-rw-r--r--src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx14
-rw-r--r--src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx9
-rw-r--r--src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx1
-rw-r--r--src/view/com/lightbox/ImageViewing/components/ImageItem/ImageLoading.tsx1
-rw-r--r--src/view/com/lightbox/ImageViewing/hooks/useImageDimensions.ts1
-rw-r--r--src/view/com/lightbox/ImageViewing/index.tsx13
-rw-r--r--src/view/com/lightbox/Lightbox.tsx28
-rw-r--r--src/view/com/lightbox/Lightbox.web.tsx30
9 files changed, 50 insertions, 53 deletions
diff --git a/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx b/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx
index eecc3f6f3..3401adaff 100644
--- a/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx
+++ b/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx
@@ -5,10 +5,10 @@
  * LICENSE file in the root directory of this source tree.
  *
  */
-import {t} from '@lingui/macro'
-import {createHitslop} from 'lib/constants'
 import React from 'react'
-import {SafeAreaView, StyleSheet, Text, TouchableOpacity} from 'react-native'
+import {createHitslop} from 'lib/constants'
+import {SafeAreaView, Text, TouchableOpacity, StyleSheet} from 'react-native'
+import {t} from '@lingui/macro'
 
 type Props = {
   onRequestClose: () => void
diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx
index 85963067c..414f98a61 100644
--- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx
+++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx
@@ -1,28 +1,28 @@
-import {Image} from 'expo-image'
 import React, {useState} from 'react'
+
 import {ActivityIndicator, Dimensions, StyleSheet} from 'react-native'
-import {Gesture, GestureDetector} from 'react-native-gesture-handler'
+import {Image} from 'expo-image'
 import Animated, {
   runOnJS,
-  useAnimatedReaction,
   useAnimatedRef,
   useAnimatedStyle,
+  useAnimatedReaction,
   useSharedValue,
   withDecay,
   withSpring,
 } from 'react-native-reanimated'
-
-import type {Dimensions as ImageDimensions, ImageSource} from '../../@types'
+import {GestureDetector, Gesture} from 'react-native-gesture-handler'
 import useImageDimensions from '../../hooks/useImageDimensions'
 import {
-  applyRounding,
   createTransform,
+  readTransform,
+  applyRounding,
   prependPan,
   prependPinch,
   prependTransform,
-  readTransform,
   TransformMatrix,
 } from '../../transforms'
+import type {ImageSource, Dimensions as ImageDimensions} from '../../@types'
 
 const SCREEN = Dimensions.get('window')
 const MIN_DOUBLE_TAP_SCALE = 2
diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx
index 5fabeb170..383490f4f 100644
--- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx
+++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx
@@ -6,10 +6,10 @@
  *
  */
 
-import {Image} from 'expo-image'
 import React, {useState} from 'react'
+
 import {Dimensions, StyleSheet} from 'react-native'
-import {Gesture, GestureDetector} from 'react-native-gesture-handler'
+import {Image} from 'expo-image'
 import Animated, {
   interpolate,
   runOnJS,
@@ -17,11 +17,12 @@ import Animated, {
   useAnimatedStyle,
   useSharedValue,
 } from 'react-native-reanimated'
-
 import {useAnimatedScrollHandler} from '#/lib/hooks/useAnimatedScrollHandler_FIXED'
+import {Gesture, GestureDetector} from 'react-native-gesture-handler'
 
-import {Dimensions as ImageDimensions, ImageSource} from '../../@types'
 import useImageDimensions from '../../hooks/useImageDimensions'
+
+import {ImageSource, Dimensions as ImageDimensions} from '../../@types'
 import {ImageLoading} from './ImageLoading'
 
 const SWIPE_CLOSE_OFFSET = 75
diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx
index 4cb7903ef..08b99bf9e 100644
--- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx
+++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx
@@ -2,7 +2,6 @@
 
 import React from 'react'
 import {View} from 'react-native'
-
 import {ImageSource} from '../../@types'
 
 type Props = {
diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageLoading.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageLoading.tsx
index 318e7d8da..9667fcaa7 100644
--- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageLoading.tsx
+++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageLoading.tsx
@@ -7,6 +7,7 @@
  */
 
 import React from 'react'
+
 import {ActivityIndicator, Dimensions, StyleSheet, View} from 'react-native'
 
 const SCREEN = Dimensions.get('screen')
diff --git a/src/view/com/lightbox/ImageViewing/hooks/useImageDimensions.ts b/src/view/com/lightbox/ImageViewing/hooks/useImageDimensions.ts
index 46f9f2295..cb46fd0d9 100644
--- a/src/view/com/lightbox/ImageViewing/hooks/useImageDimensions.ts
+++ b/src/view/com/lightbox/ImageViewing/hooks/useImageDimensions.ts
@@ -8,7 +8,6 @@
 
 import {useEffect, useState} from 'react'
 import {Image, ImageURISource} from 'react-native'
-
 import {Dimensions, ImageSource} from '../@types'
 
 const CACHE_SIZE = 50
diff --git a/src/view/com/lightbox/ImageViewing/index.tsx b/src/view/com/lightbox/ImageViewing/index.tsx
index 1432b34ff..ff8fdb86d 100644
--- a/src/view/com/lightbox/ImageViewing/index.tsx
+++ b/src/view/com/lightbox/ImageViewing/index.tsx
@@ -9,14 +9,15 @@
 // https://github.com/jobtoday/react-native-image-viewing
 
 import React, {ComponentType, useCallback, useMemo, useState} from 'react'
-import {Platform, StyleSheet, View} from 'react-native'
-import PagerView from 'react-native-pager-view'
-import Animated, {useAnimatedStyle, withSpring} from 'react-native-reanimated'
-import {Edge, SafeAreaView} from 'react-native-safe-area-context'
+import {StyleSheet, View, Platform} from 'react-native'
 
-import {ImageSource} from './@types'
-import ImageDefaultHeader from './components/ImageDefaultHeader'
 import ImageItem from './components/ImageItem/ImageItem'
+import ImageDefaultHeader from './components/ImageDefaultHeader'
+
+import {ImageSource} from './@types'
+import Animated, {useAnimatedStyle, withSpring} from 'react-native-reanimated'
+import {Edge, SafeAreaView} from 'react-native-safe-area-context'
+import PagerView from 'react-native-pager-view'
 
 type Props = {
   images: ImageSource[]
diff --git a/src/view/com/lightbox/Lightbox.tsx b/src/view/com/lightbox/Lightbox.tsx
index b3e5dfb9b..2ee5b8d59 100644
--- a/src/view/com/lightbox/Lightbox.tsx
+++ b/src/view/com/lightbox/Lightbox.tsx
@@ -1,24 +1,22 @@
-import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
-import {msg, Trans} from '@lingui/macro'
-import {useLingui} from '@lingui/react'
-import * as MediaLibrary from 'expo-media-library'
-import {saveImageToMediaLibrary, shareImageModal} from 'lib/media/manip'
-import {colors, s} from 'lib/styles'
-import {isIOS} from 'platform/detection'
 import React from 'react'
 import {LayoutAnimation, StyleSheet, View} from 'react-native'
-
+import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
+import ImageView from './ImageViewing'
+import {shareImageModal, saveImageToMediaLibrary} from 'lib/media/manip'
+import * as Toast from '../util/Toast'
+import {Text} from '../util/text/Text'
+import {s, colors} from 'lib/styles'
+import {Button} from '../util/forms/Button'
+import {isIOS} from 'platform/detection'
+import * as MediaLibrary from 'expo-media-library'
 import {
-  ImagesLightbox,
-  ProfileImageLightbox,
   useLightbox,
   useLightboxControls,
+  ProfileImageLightbox,
+  ImagesLightbox,
 } from '#/state/lightbox'
-
-import {Button} from '../util/forms/Button'
-import {Text} from '../util/text/Text'
-import * as Toast from '../util/Toast'
-import ImageView from './ImageViewing'
+import {Trans, msg} from '@lingui/macro'
+import {useLingui} from '@lingui/react'
 
 export function Lightbox() {
   const {activeLightbox} = useLightbox()
diff --git a/src/view/com/lightbox/Lightbox.web.tsx b/src/view/com/lightbox/Lightbox.web.tsx
index e3c3d5acd..fb97c30a4 100644
--- a/src/view/com/lightbox/Lightbox.web.tsx
+++ b/src/view/com/lightbox/Lightbox.web.tsx
@@ -1,31 +1,29 @@
-import {
-  FontAwesomeIcon,
-  FontAwesomeIconStyle,
-} from '@fortawesome/react-native-fontawesome'
-import {msg} from '@lingui/macro'
-import {useLingui} from '@lingui/react'
-import {colors, s} from 'lib/styles'
 import React, {useCallback, useEffect, useState} from 'react'
 import {
   Image,
   ImageStyle,
-  Pressable,
-  StyleSheet,
   TouchableOpacity,
   TouchableWithoutFeedback,
+  StyleSheet,
   View,
+  Pressable,
 } from 'react-native'
-
-import {useWebBodyScrollLock} from '#/lib/hooks/useWebBodyScrollLock'
 import {
-  ImagesLightbox,
-  ProfileImageLightbox,
+  FontAwesomeIcon,
+  FontAwesomeIconStyle,
+} from '@fortawesome/react-native-fontawesome'
+import {colors, s} from 'lib/styles'
+import ImageDefaultHeader from './ImageViewing/components/ImageDefaultHeader'
+import {Text} from '../util/text/Text'
+import {useLingui} from '@lingui/react'
+import {msg} from '@lingui/macro'
+import {
   useLightbox,
   useLightboxControls,
+  ImagesLightbox,
+  ProfileImageLightbox,
 } from '#/state/lightbox'
-
-import {Text} from '../util/text/Text'
-import ImageDefaultHeader from './ImageViewing/components/ImageDefaultHeader'
+import {useWebBodyScrollLock} from '#/lib/hooks/useWebBodyScrollLock'
 
 interface Img {
   uri: string