Repository navigation
feature(mobile): allow app to be used offline - #1932
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Hi Fynn, thank you for the PR. I just completed my round of functional testing, and I have a few questions. First, my offline mode means turning off WIFI/Cellular/BLE and putting the phone in airplane mode.
|
|
Thanks for testing this, Alex!
Okay. It also applies if a) network is connected but not working (for whatever reason) or b) the API server is down.
Thumbnails will display if a) the asset is stored locally on device or b) it has previously been cached. You can click on them to view. For local assets, the original is loaded as always. For remote assets, the preview/original is loaded (and shown if cached), else the cached thumbnail is shown as a fallback.
Correct. Assets on device (local) are always shown both thumb and original (if in slide/detail view)
I also noticed some slight delay. Not sure why the page is not loading immediately. It should at least display the default state of all values.. I guess this is a riverpod issue or our
Hangs forever? For me, it takes a while longer (waiting for a server response) but then opens the app after a short (maybe 1 second) delay. Not sure what's the best approach to speed up waiting on server responses. |
Maybe don't wait at all and start in offline mode by default. Then loading can happen in the background, but if it takes too long the user is made aware of this. Either by a popup or message on a page when a connection is necessary or an offline icon somewhere. The app could also occasionally check for a network connection and switch between online/offline mode. Just my thoughts on an ideal solution. Depending on the current implementation, this could be quite some work to add but maybe some things are more straightforward. If it's too much, it can always be done in a future PR. |
Yeah, that is out of scope for this PR. Would need quite a large refactor because everything is historically server-centric in the app. Better suited for a follow-up PR. |
|
Works well for me! I tried it offline & online, and gallery photos and videos loaded nicely. I also launched it while it airplane mode and it brought me right to the main timeline. Didn't notice if it took any longer. |
Uh oh!
There was an error while loading. Please reload this page.