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

feat(mobile): ios overnight upload #8385

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

shenlong-tanwen
Copy link
Member

Changes made in the PR

  • Adds a new Overnight Upload route specific to iOS devices
  • Enables Wakelock while overnight upload route is opened and backup is in progress and the wakelock is given up when the backup is completed or we leave the overnight upload route
  • The upload icon is moved around the screen in the overight upload route while the background upload is in progress to prevent screen burn

Screenshots

Overnight upload Backup Yet to Start Backup In-Progress
Icon Backup yet to start Backup In Progress

Copy link

cloudflare-pages bot commented Mar 30, 2024

Deploying immich with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1a6e85f
Status: ✅  Deploy successful!
Preview URL: https://91c76757.immich.pages.dev
Branch Preview URL: https://feat-mobile-ios-overnight.immich.pages.dev

View logs

@alextran1502
Copy link
Contributor

Hello, thank you for the PR. I tested the PR on a physical device and saw a lot of flashing during the upload operation.

RPReplay_Final1711944612.MP4

After spending more time thinking about this mechanism, since it will likely be a one-time process, we can have it enabled by default when the upload process runs on the foreground page, similar to your original implementation. What do you think?

@mertalev
Copy link
Contributor

mertalev commented Apr 2, 2024

It should still darken the screen after some time to avoid burn-in.

@shenlong-tanwen
Copy link
Member Author

After spending more time thinking about this mechanism, since it will likely be a one-time process, we can have it enabled by default when the upload process runs on the foreground page, similar to your original implementation. What do you think?

I still feel that preventing device sleep in one route is much better than preventing it across the app. Also, the screen switches to an all black background with only an upload button and stop backup button in the overnight screen to save battery. The flicker issue seems to be from the animatedswitcher. I've removed it for the time being. Seems to only reproduce in an iOS simulator and not on an android emulator.

@alextran1502
Copy link
Contributor

@shenlong-tanwen I did not mean to prevent sleep across the app, only when entering the backup page. Just not needing to create an additional route

@shenlong-tanwen
Copy link
Member Author

@shenlong-tanwen I did not mean to prevent sleep across the app, only when entering the backup page. Just not needing to create an additional route

I've added a new iOS specific button called "Start Overnight Upload" which would trigger the overnight upload directly from the backup controller page

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

Successfully merging this pull request may close these issues.

None yet

4 participants