ShaneIsrael / fireshare

Self host your media and share with unique links
GNU General Public License v3.0
682 stars 41 forks source link

fix upload card on first load #190

Closed kohsine closed 1 year ago

kohsine commented 1 year ago

Band-aid fix for #189. I think the issue stems from trying to access ui_config before it has been set. By moving getSetting('ui_config') into the component, it has more chances to get ui_config after it has been set. Still not a perfect solution since there is still a race condition here, but the upload card has shown up on the first time for me every time now.

A better solution would be to have a context that manages all the config options so the pages auto re-render once the config options have been fetched from the backend.

ShaneIsrael commented 1 year ago

Thanks for this, I'm going to merge to the dev branch first to verify nothing is broken (I don't see how anything would be) and then I'll merge to main for a release.