diff options
author | George Hazan <ghazan@miranda.im> | 2023-04-27 16:48:01 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-04-27 16:48:01 +0300 |
commit | 18476194fe242b72811117e36fdc041f379c9aa3 (patch) | |
tree | f766b1faa46d6f29888db83e926985c858042491 | |
parent | a65206da4883b79ff3b0a4418562005e267d369e (diff) |
CLM_EXPAND: if a group isn't passed, apply the folded state to all groups in the root
-rw-r--r-- | src/mir_app/src/clcmsgs.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mir_app/src/clcmsgs.cpp b/src/mir_app/src/clcmsgs.cpp index 5b92d1a0f0..b2b889245d 100644 --- a/src/mir_app/src/clcmsgs.cpp +++ b/src/mir_app/src/clcmsgs.cpp @@ -105,9 +105,16 @@ LRESULT fnProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wPar break;
case CLM_EXPAND:
- if (Clist_FindItem(hwnd, dat, wParam, &contact))
- if (contact->type == CLCIT_GROUP)
- g_clistApi.pfnSetGroupExpand(hwnd, dat, contact->group, lParam);
+ if (wParam) {
+ if (Clist_FindItem(hwnd, dat, wParam, &contact))
+ if (contact->type == CLCIT_GROUP)
+ g_clistApi.pfnSetGroupExpand(hwnd, dat, contact->group, lParam);
+ }
+ else {
+ for (auto &it: dat->list.cl)
+ if (it->type == CLCIT_GROUP)
+ g_clistApi.pfnSetGroupExpand(hwnd, dat, it->group, lParam);
+ }
break;
case CLM_FINDCONTACT:
|