ProtonMail / proton-drive

120 stars 11 forks source link

Possible error of initializing "hasInitialAuth" value in src/app/App.tsx #1

Closed vladimiry closed 3 years ago

vladimiry commented 3 years ago

I guess this function should return the opposite value (like !window.location.pathname.startsWith('/urls'), notice ! at the beginning):

https://github.com/ProtonMail/proton-drive/blob/95cee5d6362748ef2f16eb6e3630c181dcc1df0c/src/app/App.tsx#L34-L36

What makes me to think so:

mmso commented 3 years ago

Thanks for the report @vladimiry

This will be fixed in an upcoming release

vladimiry commented 3 years ago

@mms, a quick question regarding drive. Will it be fully functional if there is no support for Service Workers feature in the browser?

vincaslt commented 3 years ago

@mms, a quick question regarding drive. Will it be fully functional if there is no support for Service Workers feature in the browser?

In a sense, yes, but it will be left at the mercy of the OS. Service worker is used to mitigate memory loads during download, and if it's unavailable, the download will proceed fully in-memory, which could fail with very large files if there's not enough memory or OS decides to kill the process.

vladimiry commented 3 years ago

@vincaslt thanks for the detailed response. In ElectronMail app I intentionally use in-memory-only storage for the email account webviews (none of the browser-specific storages get written to disk) which means the absence of Service Workers support won't make any difference in my case.

vladimiry commented 3 years ago

Handled in 1503d9034fde2f791e1a79c87795e535fec504e7.