Skip to content
  • Benjamin Fischer's avatar
    Implemented (workspace) session saving & restoring and some minor changes: · b0b5b643
    Benjamin Fischer authored
     - the ExtensionView features a state that can be used to store session persitent data (e.g. working directory, open file name, current selection, ...)
     - it can be accessed with the functions getState(key) and setState(key, value, delay)
     - the delay (given in seconds) should be used to lessen the load on the server and not immideatly save upon the every change; here an example: the scroll position in saved as a state, this should be done with a good delay (e.g. 10s) so one won't overload the connection with lots of save requests
     - every state change will emit an "stateChange" event with the changed states key as first parameter - or null if the entire state was loaded from scrach (during init)
     - the state saving does not account if one logged in multiple times (e.g. from phone & laptop): the latest save will be stored
     - restoring the state available only when starting a new session (e.g. (re)connecting the workspace, reloading the page, logging in on another maching)
     - restoring can be enabled in the settings (Workspace Handler -> continueSession) - even to always resore session
     - minor change: cleaned up the parameter handling during class creation (init)
     - also fixed various bugs
    refs #1875, fix #1905, #1845
    b0b5b643