diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-21 15:20:39 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-21 15:20:39 +0300 |
commit | 2f0950cfb4fe47f679b03d8f26c1067055f0973a (patch) | |
tree | ae31800924e349ee3e184faed90c82ee3aa37190 /plugins/NewStory | |
parent | 4c8aa3c071ef16958ad239b2ea1816b51f704115 (diff) |
fixes #2335 (NewStory: не писать дефолтные шаблоны в базу)
Diffstat (limited to 'plugins/NewStory')
-rw-r--r-- | plugins/NewStory/src/templates.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugins/NewStory/src/templates.cpp b/plugins/NewStory/src/templates.cpp index 3a3ca833bc..cf17be6a73 100644 --- a/plugins/NewStory/src/templates.cpp +++ b/plugins/NewStory/src/templates.cpp @@ -370,7 +370,12 @@ void LoadTemplates() void SaveTemplates() { - for (auto &it : templates) - if (it.value) - db_set_ws(0, MODULENAME, it.setting, it.value); + for (auto &it : templates) { + if (it.value) { + if (mir_wstrcmp(it.value, it.defvalue)) + g_plugin.setWString(it.setting, it.value); + else + g_plugin.delSetting(it.setting); + } + } } |