The changes in the code fix the resetting of the Username to the default value after restarting the atom editor
Issues : 1. First time intialization triggers the !notfirstTime flag and the username is reset to the default value (just as it should) but the second time restart will trigger the same as the serializer won't get a notFirstTime flag from the current state (as only the current state is sent to the serialization function)
Fix: Added an else statement for generating the notFirstTime flag even when it is not the first time (check code for better understanding)
This fixed the issue of changing Username in the same environment. (from where it has been opened)
Issue : 2 The above did not fix the change of Username when atom is opened from a new console window (any other environment)
Fix : Instead of adding the notFirstTime flag to the current environment and writing a deseralizer for it, I added the same property to the pre-received state object and pointed it to the current state. (check code for better understanding)
This seems to have fixed both the issues.
PS: Test and merge, if there are any bugs caused by my code, I'll be glad to look at them.
The changes in the code fix the resetting of the Username to the default value after restarting the atom editor
Issues : 1. First time intialization triggers the !notfirstTime flag and the username is reset to the default value (just as it should) but the second time restart will trigger the same as the serializer won't get a notFirstTime flag from the current state (as only the current state is sent to the serialization function)
Fix: Added an else statement for generating the notFirstTime flag even when it is not the first time (check code for better understanding) This fixed the issue of changing Username in the same environment. (from where it has been opened)
Issue : 2 The above did not fix the change of Username when atom is opened from a new console window (any other environment)
Fix : Instead of adding the notFirstTime flag to the current environment and writing a deseralizer for it, I added the same property to the pre-received state object and pointed it to the current state. (check code for better understanding)
This seems to have fixed both the issues.
PS: Test and merge, if there are any bugs caused by my code, I'll be glad to look at them.