MyGit

justagoodman/JMComic

Fork: 11 Star: 105 (更新于 2024-12-22 18:11:34)

license: 暂无

Language: TypeScript .

A third party 18comic app build with ReactNative

最后发布版本: 0.0.6 ( 2022-04-04 16:34:46)

GitHub网址

JMComic

A third party 18comic app build with ReactNative

Prerelease at Release Page

todo

  • using okhttp to as http client done
  • category screen
  • pull to load
  • Video screen
  • Anime screen
  • using thread pool to download image
  • UI

how to run

requirements: NDK

First: Fresco

these steps are tring to resolve the problom that when RN displays <Large Image>, fresco will auto down sample the image which make the image low quality

special thanks to @clytras

yarn fresco-clone // clone fresco

Go to /android/libraries/fresco

Add new file named local.properties

Content surposed to be

ndk.dir=<Path to NDK>  ## such as E:\\NDK\\android-ndk-r21e
org.gradle.daemon=true
org.gradle.parallel=true
org.gradle.configureondemand=true

Find file at fresco

/android/libraries/fresco/imagepipline/src/main/java/producers/DecodeProducer.java

Find method <ProgressiveDecoder> at DecodeProducer.java

JobRunnable job =
          new JobRunnable() {
            @Override
            public void run(EncodedImage encodedImage, @Status int status) {
              if (encodedImage != null) {
                if (mDownsampleEnabled || !statusHasFlag(status, Consumer.IS_RESIZING_DONE)) {
                  ImageRequest request = producerContext.getImageRequest();
                  if (mDownsampleEnabledForNetwork
                      || !UriUtil.isNetworkUri(request.getSourceUri())) {
                    encodedImage.setSampleSize(
                        DownsampleUtil.determineSampleSize(
                            request.getRotationOptions(),
                            request.getResizeOptions(),
                            encodedImage,
                            maxBitmapSize));
                  }
                }

                if (producerContext
                    .getImagePipelineConfig()
                    .getExperiments()
                    .shouldDownsampleIfLargeBitmap()) {
                  maybeIncreaseSampleSize(encodedImage);
                }

                doDecode(encodedImage, status);
              }
            }
          };

Change it

JobRunnable job =
          new JobRunnable() {
            @Override
            public void run(EncodedImage encodedImage, @Status int status) {
            //   if (encodedImage != null) {
            //     if (mDownsampleEnabled || !statusHasFlag(status, Consumer.IS_RESIZING_DONE)) {
            //       ImageRequest request = producerContext.getImageRequest();
            //       if (mDownsampleEnabledForNetwork
            //           || !UriUtil.isNetworkUri(request.getSourceUri())) {
            //         encodedImage.setSampleSize(
            //             DownsampleUtil.determineSampleSize(
            //                 request.getRotationOptions(),
            //                 request.getResizeOptions(),
            //                 encodedImage,
            //                 maxBitmapSize));
            //       }
            //     }

            //     if (producerContext
            //         .getImagePipelineConfig()
            //         .getExperiments()
            //         .shouldDownsampleIfLargeBitmap()) {
            //       maybeIncreaseSampleSize(encodedImage);
            //     }

                doDecode(encodedImage, status);
              }
            }
          };

Second: install dependency

yarn install

Third: start project

yarn android

Fouth: release

npm run fresco-clean
cd android
// if want to release apk
/gradlew assembleRelease
// if want to release aab
gradlew bundleRelease

最近版本更新:(数据更新于 2024-12-04 02:36:59)

2022-04-04 16:34:46 0.0.6

2021-09-08 00:18:22 0.0.5

2021-08-13 01:27:05 0.0.4

2021-08-11 02:12:01 0.0.3

2021-05-06 01:24:20 0.0.2

2021-04-29 23:03:36 0.0.1

2021-03-04 10:19:26 0.01

主题(topics):

18comic, app, jmcomic, reactnative

justagoodman/JMComic同语言 TypeScript最近更新仓库

2024-12-22 15:05:26 elizaOS/eliza

2024-12-21 21:40:12 lobehub/lobe-chat

2024-12-21 12:01:51 siyuan-note/siyuan

2024-12-21 09:15:35 MetaCubeX/metacubexd

2024-12-21 04:50:26 mediar-ai/screenpipe

2024-12-20 19:36:48 vitejs/vite