Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress on Android from 0 to 1 #296

Open
CaiqueNds opened this issue Nov 16, 2023 · 3 comments
Open

Progress on Android from 0 to 1 #296

CaiqueNds opened this issue Nov 16, 2023 · 3 comments

Comments

@CaiqueNds
Copy link

On iOS the unzip progress works correctly. No Android only works from 0 to 1. Is that the same way it works?

@incom-app-ru
Copy link

a similar problem

@Featuredutka
Copy link

Featuredutka commented Oct 28, 2024

Similar problem

react-native@0.73.9
react-native-zip-archive@7.0.1

While trying to display unzip progress of a folder (complex tree hierarchy inside) on android it's value is not updated until it has reached 1

Code:

  const [unzipProg, setUnzipProg] = useState(0);

  useEffect(() => {
    const zipSubscribe = subscribeToZipArchive(({ progress, filePath }) => {
      setUnzipProg(progress);
      console.log('effect unzip progress   ', progress)
      return () => {
        zipSubscribe.remove();
      };
    });
  });

 ...

  unzip(sourcePath, targetPath)
    .then((path) => {
      console.log(`unzip completed`)
    })
    .catch((error) => {
      console.error(error)
    })

UPD 28.10.24
Rollback to version 5.0.6 seems to fix that problem but now I have to use npm install --legacy-peer-deps

@l3utterfly
Copy link

Fixed here: #322

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants