Pull to Refresh for iOS App

Install this theme component

Hello :wave:

There is a missing function from iOS PWAs, it isn’t contain the ‘pull to refresh’ so if you want to reload you have to close the PWA and reopen. This theme component tries to fill this gap with a ‘pull to refresh’ function. I have disabled this on chat pages because this isn’t work safely in channels… The activation point is the #main-outlet so if you pull down under the header on the top of the page it will trigger the loader. There is an arrow indicator which will indicate when you’ll be good to release to reload.

It contains some theme settings to customize the loader.

Thanks for everyone tested it newer devices in this topic :hugs:

TODO: Try to recreate the default Safari loader or something like that.

10 Likes

It works with DiscourseHub too :flushed: That’s great.

I have to pull down 2-3 seconds, and that is a bit long, but I don’t know if that comes from i-devices or the component. Not a biggie, though.

2 Likes

When you pull it quickly, it just refreshes immediately. But when you pull it at a relatively slower speed, the chevron renders first, followed by the loading spinner. I’m guessing the delay between the chevron and the loading spinner is intentional for better feedback and to avoid unnecessary triggers. Please correct me if I’m wrong, @Don.

2 Likes