diff options
author | George Hazan <ghazan@miranda.im> | 2020-04-09 21:36:43 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-04-09 21:36:43 +0300 |
commit | 7b9996c68cf324e629d2a9298c466f1fa4ec2002 (patch) | |
tree | 83fe1e5118b911b58e15436fce249f72b7d92c81 /protocols/ICQ-WIM/src | |
parent | 4c7958599dcb5a6f0d23003046779269bc6b547a (diff) |
fixes #2316 (ICQ: если удалить ClistGroups из базы, то контакты при перезапуске пропадут из клиста)
Diffstat (limited to 'protocols/ICQ-WIM/src')
-rw-r--r-- | protocols/ICQ-WIM/src/poll.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/protocols/ICQ-WIM/src/poll.cpp b/protocols/ICQ-WIM/src/poll.cpp index f14e30ba95..f6072bdf0f 100644 --- a/protocols/ICQ-WIM/src/poll.cpp +++ b/protocols/ICQ-WIM/src/poll.cpp @@ -52,18 +52,17 @@ void CIcqProto::ProcessBuddyList(const JSONNode &ev) setWString(hContact, "IcqGroup", pGroup->wszName); + if (!bCreated) { + Clist_GroupCreate(0, pGroup->wszName); + bCreated = true; + } + ptrW mirGroup(Clist_GetGroup(hContact)); if (mir_wstrcmp(mirGroup, pGroup->wszName)) bEnableMenu = true; - if (!mirGroup) { - if (!bCreated) { - Clist_GroupCreate(0, pGroup->wszName); - bCreated = true; - } - + if (!mirGroup) Clist_SetGroup(hContact, pGroup->wszName); - } } } @@ -115,15 +114,14 @@ void CIcqProto::ProcessDiff(const JSONNode &ev) setWString(hContact, "IcqGroup", pGroup->wszName); - ptrW wszGroup(Clist_GetGroup(hContact)); - if (!wszGroup) { - if (!bCreated) { - Clist_GroupCreate(0, pGroup->wszName); - bCreated = true; - } + if (!bCreated) { + Clist_GroupCreate(0, pGroup->wszName); + bCreated = true; + } + ptrW wszGroup(Clist_GetGroup(hContact)); + if (!wszGroup) Clist_SetGroup(hContact, pGroup->wszName); - } } if (bDeleted) |