terminal/src/cascadia
Mike Griese 8dd317313b
Clear out state.json when we find and empty settings.json (#11448)
If we find that the settings file doesn't exist, or is empty, then let's quick
delete the state file as well. If the user does have a state file, and not a
settings, then they probably tried to reset their settings. It might have data
in it that was only relevant for a previous iteration of the settings file. If
we don't, we'll load the old state and ignore all dynamic profiles (for
example)!

We'll remove all of the data in the `ApplicationState` object and reset it to
the defaults.

This will delete the state file!

That's the sure-fire way to make sure the data doesn't come back. If we leave
it untouched, then when we go to write the file back out, we'll first re-read
it's contents and try to overlay our new state. However, nullopts won't remove
keys from the JSON, so we'll end up with the original state in the file.

* [x] Closes #11119
* [x] Tested on a cold launch of the Terminal with an existing `state.json`
and an empty `settings.json`
* [x] Tested a hot-reload of deleting the `settings.json`
2021-10-11 15:51:47 +00:00
..
CascadiaPackage Enable DefApp hooks for stable (#11423) 2021-10-06 11:32:14 +00:00
inc Only access ControlInteractivity through the projection (#10051) 2021-07-19 11:59:30 -05:00
LocalTests_SettingsModel Implement basic profile matching (#11390) 2021-10-08 00:40:10 +00:00
LocalTests_TerminalApp Fix failing TestHostApp unit tests (#11394) 2021-10-05 18:21:03 +00:00
PublicTerminalCore Implement Keyboard Selection (#10824) 2021-09-23 12:24:32 -07:00
Remoting Persist window layout cont. save multiple windows (#11083) 2021-09-27 21:18:39 +00:00
ShellExtension Properly escape constructed wt command-lines (#11314) 2021-09-24 16:17:16 +00:00
TerminalApp Implement basic profile matching (#11390) 2021-10-08 00:40:10 +00:00
TerminalAzBridge Upgrade to C++/WinRT 2.0.210825.3 (#11188) 2021-09-10 21:33:13 +00:00
TerminalConnection Implement basic profile matching (#11390) 2021-10-08 00:40:10 +00:00
TerminalControl When enabling opacity on win10, automatically enable acrylic (#11372) 2021-10-07 11:39:20 +00:00
TerminalCore Implement the Delta E algorithm to improve color perception (#11095) 2021-10-07 22:43:17 +00:00
TerminalSettingsEditor Implement the Delta E algorithm to improve color perception (#11095) 2021-10-07 22:43:17 +00:00
TerminalSettingsModel Clear out state.json when we find and empty settings.json (#11448) 2021-10-11 15:51:47 +00:00
UnitTests_Control Implement the Delta E algorithm to improve color perception (#11095) 2021-10-07 22:43:17 +00:00
UnitTests_Remoting Persist window layout cont. save multiple windows (#11083) 2021-09-27 21:18:39 +00:00
UnitTests_TerminalCore Implement the Delta E algorithm to improve color perception (#11095) 2021-10-07 22:43:17 +00:00
ut_app Reduce usage of Json::Value throughout Terminal.Settings.Model (#11184) 2021-09-22 16:27:31 +00:00
WindowsTerminal Refresh frame margins when moving between monitors (#11412) 2021-10-06 11:34:53 +00:00
WindowsTerminal_UIATests Enable /Zc:preprocessor (#10593) 2021-07-13 23:00:11 +00:00
WindowsTerminalUniversal Update to MUX 2.7 (#11240) 2021-09-20 22:08:55 +00:00
WinRTUtils Replace the UWP file export with the shell32 one (#11365) 2021-10-01 18:33:22 +00:00
WpfTerminalControl wpf: make sure to pack api-ms-win-core-synch-l1-2-0 (#10587) 2021-07-08 10:31:59 -05:00
WpfTerminalTestNetCore wpf: make sure to pack api-ms-win-core-synch-l1-2-0 (#10587) 2021-07-08 10:31:59 -05:00
wt Upgrade Windows SDK to 19041 (#10118) 2021-05-20 16:04:25 +00:00
CascadiaResources.build.items Update Cascadia Code to 2106.17 (#10455) 2021-06-18 20:47:19 +00:00