mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-19 21:03:11 -07:00
restore session
This commit is contained in:
parent
a683e2346b
commit
bcedac85a1
2 changed files with 2 additions and 2 deletions
|
@ -558,7 +558,7 @@ void ApplicationViewModel::Initialize(ViewMode mode)
|
|||
|
||||
void ApplicationViewModel::Initialize(CalculatorApp::ViewModel::Snapshot::ApplicationSnapshot ^ snapshot)
|
||||
{
|
||||
// TODO: restore
|
||||
m_CalculatorViewModel = ref new StandardCalculatorViewModel(snapshot->StandardCalculator);
|
||||
Initialize(static_cast<ViewMode>(snapshot->Mode));
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace CalculatorApp
|
|||
string embeddedData;
|
||||
try
|
||||
{
|
||||
var json = JsonSerializer.Serialize(new ApplicationSnapshotAlias { Value = Model.Snapshot });
|
||||
var json = JsonSerializer.Serialize(new ApplicationSnapshotAlias(Model.Snapshot));
|
||||
embeddedData = Convert.ToBase64String(DeflateUtils.Compress(json));
|
||||
}
|
||||
catch (Exception)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue