Check size for sneding customizations

This commit is contained in:
MichaelDvP
2023-01-18 08:50:56 +01:00
parent a38f4978fa
commit a21352ae4f

View File

@@ -263,9 +263,9 @@ const SettingsCustomization: FC = () => {
(new_de.ma ? '<' + new_de.ma : '') (new_de.ma ? '<' + new_de.ma : '')
); );
// check size in bytes to match buffer in CPP, which is 4096 // check size in bytes to match buffer in CPP, which is 2048
const bytes = new TextEncoder().encode(JSON.stringify(masked_entities)).length; const bytes = new TextEncoder().encode(JSON.stringify(masked_entities)).length;
if (bytes > 4000) { if (bytes > 2000) {
enqueueSnackbar(LL.CUSTOMIZATIONS_FULL(), { variant: 'warning' }); enqueueSnackbar(LL.CUSTOMIZATIONS_FULL(), { variant: 'warning' });
return; return;
} }