fix(config): Remove userConfigurationLength from json serialization (#490)
This commit is contained in:
committed by
László Monda
parent
78e27c3688
commit
d9417eaa89
@@ -27,7 +27,6 @@ export class UserConfiguration {
|
|||||||
|
|
||||||
fromJsonObject(jsonObject: any): UserConfiguration {
|
fromJsonObject(jsonObject: any): UserConfiguration {
|
||||||
this.dataModelVersion = jsonObject.dataModelVersion;
|
this.dataModelVersion = jsonObject.dataModelVersion;
|
||||||
this.userConfigurationLength = jsonObject.userConfigurationLength;
|
|
||||||
this.deviceName = jsonObject.deviceName;
|
this.deviceName = jsonObject.deviceName;
|
||||||
this.setDefaultDeviceName();
|
this.setDefaultDeviceName();
|
||||||
this.moduleConfigurations = jsonObject.moduleConfigurations.map((moduleConfiguration: any) => {
|
this.moduleConfigurations = jsonObject.moduleConfigurations.map((moduleConfiguration: any) => {
|
||||||
@@ -69,7 +68,6 @@ export class UserConfiguration {
|
|||||||
toJsonObject(): any {
|
toJsonObject(): any {
|
||||||
return {
|
return {
|
||||||
dataModelVersion: this.dataModelVersion,
|
dataModelVersion: this.dataModelVersion,
|
||||||
userConfigurationLength: this.userConfigurationLength,
|
|
||||||
deviceName: this.deviceName,
|
deviceName: this.deviceName,
|
||||||
moduleConfigurations: this.moduleConfigurations.map(moduleConfiguration => moduleConfiguration.toJsonObject()),
|
moduleConfigurations: this.moduleConfigurations.map(moduleConfiguration => moduleConfiguration.toJsonObject()),
|
||||||
keymaps: this.keymaps.map(keymap => keymap.toJsonObject(this.macros)),
|
keymaps: this.keymaps.map(keymap => keymap.toJsonObject(this.macros)),
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
"dataModelVersion": 4,
|
"dataModelVersion": 4,
|
||||||
"userConfigurationLength": 3846,
|
|
||||||
"deviceName": "My UHK",
|
"deviceName": "My UHK",
|
||||||
"moduleConfigurations": [
|
"moduleConfigurations": [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user