TMink / Digitales-3D-Feldbuch

Mozilla Public License 2.0
2 stars 0 forks source link

The cookies for current activity/place/position don't work without local data #196

Closed JuHardtung closed 8 months ago

JuHardtung commented 8 months ago

When we have an empty local system and then log into an account, we can use the system with only online data. This works, but we can't set the cookies, as they require the local IndexedDB data.

So we have two options that I can see:

  1. always save the online data to the local IndexedDB first and then use it in the system. (+) sudden loss of internet connection is fine, as the data persists locally (-) 'probably' slower (-) a lot of work
  2. rework how the cookies are being handled (+) saving the currently chosen activity/place/position in the cookies is bad (-) sudden loss of internet connection is bad, as the data is not available locally (-) lot of work

Long term we should probably implement both solutions combined with each other, but for now I will implement the first one. Our must-have requirement of seamless transition between online and offline usage has a higher priority than suboptimal code.

JuHardtung commented 8 months ago

Fixed with a6d2ce353bc3e35644b11f45b7d273bc5d0518d5

This commit does not include the cookie-usage rework. But i'll close this issue regardless, as we have a different Issue that is tracking the cookie rework https://github.com/TMink/Digitales-3D-Feldbuch-Projekt-3-/issues/172