AyuGramDesktop/Telegram/SourceFiles/ayu
Neurotoxin001 2250fe75c4
fix: use custom serialization for settings
The error occurred when adding a new fields, for example showForwards, to the AyuGramSettings class. The NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT macro was used for serialization, which works correctly only when the number of parameters is up to 64. After extending the structure, the macro failed to expand and the compiler started generating messages about undefined identifiers like NLOHMANN_JSON_TO.

The fix was to replace the problematic macro with manual implementation of to_json and from_json functions. For each field, it is now explicitly specified how to serialize and deserialize it, which eliminates the limitation on the number of arguments. Additionally, auxiliary macros NLOHMANN_JSON_TO, NLOHMANN_JSON_FROM and NLOHMANN_JSON_FROM_WITH_DEFAULT have been declared in case they are absent in the header file used.

More info: https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/#notes
2025-06-26 19:08:41 +03:00
..
data feat: speed-up ayudata queries 2025-04-25 00:42:53 +03:00
features fix: messageshot on macOS 2025-01-31 03:07:17 +03:00
libs chore: update sqlite3 2025-06-06 11:38:15 +03:00
ui chore: refactor & reformat settings 2025-06-08 11:00:04 +03:00
utils chore: refactor & reformat settings 2025-06-08 11:00:04 +03:00
ayu_constants.h chore: update copyright 2025-01-16 13:08:58 +03:00
ayu_infra.cpp chore: refactor & reformat settings 2025-06-08 11:00:04 +03:00
ayu_infra.h chore: update copyright 2025-01-16 13:08:58 +03:00
ayu_lang.cpp chore: update copyright 2025-01-16 13:08:58 +03:00
ayu_lang.h chore: update copyright 2025-01-16 13:08:58 +03:00
ayu_settings.cpp chore: refactor & reformat settings 2025-06-08 11:00:04 +03:00
ayu_settings.h fix: use custom serialization for settings 2025-06-26 19:08:41 +03:00
ayu_state.cpp chore: update copyright 2025-01-16 13:08:58 +03:00
ayu_state.h chore: update copyright 2025-01-16 13:08:58 +03:00
ayu_url_handlers.cpp fix: more checks for disposal 2025-03-09 00:30:18 +03:00
ayu_url_handlers.h chore: update copyright 2025-01-16 13:08:58 +03:00
ayu_worker.cpp chore: refactor & reformat settings 2025-06-08 11:00:04 +03:00
ayu_worker.h chore: update copyright 2025-01-16 13:08:58 +03:00