mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
Persist app zone history in real time (#1257)
* save settings every time changes are performed * settings are not saved on app exit
This commit is contained in:
@@ -207,6 +207,7 @@ namespace JSONHelpers
|
||||
if (data.zoneSetUuid == zoneSetId && data.deviceId == deviceId)
|
||||
{
|
||||
appZoneHistoryMap.erase(processPath);
|
||||
SaveFancyZonesData();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -224,6 +225,7 @@ namespace JSONHelpers
|
||||
}
|
||||
|
||||
appZoneHistoryMap[processPath] = AppZoneHistoryData{ .zoneSetUuid = zoneSetId, .deviceId = deviceId, .zoneIndex = zoneIndex };
|
||||
SaveFancyZonesData();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -538,6 +540,7 @@ namespace JSONHelpers
|
||||
if (appliedZoneSetsMap.contains(std::wstring{ activeZoneSetId }))
|
||||
{
|
||||
deviceInfoMap[deviceId] = DeviceInfoData{ appliedZoneSetsMap.at(std::wstring{ activeZoneSetId }), static_cast<bool>(showSpacing), static_cast<int>(spacing), static_cast<int>(zoneCount) };
|
||||
SaveFancyZonesData();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user