diff --git a/src/components/ImageWithRetry.tsx b/src/components/ImageWithRetry.tsx
deleted file mode 100644
index dac880d..0000000
--- a/src/components/ImageWithRetry.tsx
+++ /dev/null
@@ -1,103 +0,0 @@
-import React, { useState, memo } from 'react';
-import { Image as ReactNativeImage, StyleSheet, Dimensions } from 'react-native';
-import { CachedImage, CacheManager } from '@georstat/react-native-image-cache';
-import { AsyncStatus } from '~/utils';
-import { nanoid } from '@reduxjs/toolkit';
-import { Center } from 'native-base';
-import ErrorWithRetry from '~/components/ErrorWithRetry';
-
-const windowWidth = Dimensions.get('window').width;
-const windowHeight = Dimensions.get('window').height;
-
-interface ImageWithRetryProps {
- uri: string;
- headers?: { [name: string]: string };
- horizontal?: boolean;
- onSuccess?: ({ width, height }: { width: number; height: number }) => void;
-}
-
-const ImageWithRetry = ({
- uri,
- headers = {},
- horizontal = false,
- onSuccess,
-}: ImageWithRetryProps) => {
- const [retryHash, setRetryHash] = useState(nanoid());
- const [loadStatus, setLoadStatus] = useState(AsyncStatus.Pending);
- const [imageHeight, setImageHeight] = useState(windowHeight);
-
- const handleLoadSuccess = () => {
- setLoadStatus(AsyncStatus.Fulfilled);
-
- if (!horizontal) {
- CacheManager.prefetchBlob(uri, { headers })
- .then((base64) => {
- if (!base64) {
- handleError();
- return;
- }
- base64 = 'data:image/png;base64,' + base64;
-
- ReactNativeImage.getSizeWithHeaders(base64, headers, (width, height) => {
- const fillHeight = (height / width) * windowWidth;
- setImageHeight(fillHeight);
- onSuccess && onSuccess({ width: windowWidth, height: fillHeight });
- });
- })
- .catch(handleError);
- }
- };
- const handleError = () => {
- setLoadStatus(AsyncStatus.Rejected);
- };
- const handleRetry = () => {
- CacheManager.removeCacheEntry(uri)
- .then(() => {})
- .catch(() => {})
- .finally(() => {
- setLoadStatus(AsyncStatus.Pending);
- setRetryHash(nanoid());
- });
- };
-
- if (loadStatus === AsyncStatus.Rejected) {
- return ;
- }
-
- return (
- (
-
-
-
- )}
- />
- );
-};
-
-const styles = StyleSheet.create({
- contain: {
- width: '100%',
- height: '100%',
- },
- cover: {
- width: windowWidth,
- },
- loading: {
- width: '30%',
- height: '100%',
- },
-});
-
-export default memo(ImageWithRetry);
diff --git a/src/components/JMComicImage.tsx b/src/components/JMComicImage.tsx
deleted file mode 100644
index 7d0861a..0000000
--- a/src/components/JMComicImage.tsx
+++ /dev/null
@@ -1,164 +0,0 @@
-import React, { useRef, useState, useCallback, memo } from 'react';
-import { Image as ReactNativeImage, StyleSheet, Dimensions } from 'react-native';
-import { CachedImage, CacheManager } from '@georstat/react-native-image-cache';
-import { AsyncStatus, scaleToFit } from '~/utils';
-import { useFocusEffect } from '@react-navigation/native';
-import { Image, Center } from 'native-base';
-import { unscramble } from '~/plugins/jmc';
-import { nanoid } from '@reduxjs/toolkit';
-import ErrorWithRetry from '~/components/ErrorWithRetry';
-import Canvas, { Image as CanvasImage } from 'react-native-canvas';
-
-const windowWidth = Dimensions.get('window').width;
-const windowHeight = Dimensions.get('window').height;
-
-interface JMComicImageProps {
- uri: string;
- headers?: { [name: string]: string };
- horizontal?: boolean;
- onSuccess?: ({ width, height }: { width: number; height: number }) => void;
-}
-interface Source {
- base64: string;
- width: number;
- height: number;
-}
-
-const JMComicImage = ({ uri, headers = {}, horizontal = false, onSuccess }: JMComicImageProps) => {
- const [source, setSource] = useState