Skip to content

Commit

Permalink
fixes #4357 (Telegram: невозможно удалить историю с сервера только у …
Browse files Browse the repository at this point in the history
…себя)
  • Loading branch information
georgehazan committed Apr 17, 2024
1 parent 5f3e1a0 commit 3693cff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mir_app/src/clui.cpp
Expand Up @@ -149,6 +149,8 @@ class CDeleteDlg : public CDlgBase
bHasServer = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1) & PF1_SERVERCLIST) != 0;
bHasHistory = ProtoServiceExists(szProto, PS_EMPTY_SRV_HISTORY);
bForEveryone = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4) & PF4_DELETEFORALL) != 0;

chkDelHistory.OnChange = Callback(this, &CDeleteDlg::onChange_Server);
}

bool OnInitDialog() override
Expand Down Expand Up @@ -193,6 +195,11 @@ class CDeleteDlg : public CDlgBase
{
DeleteObject((HFONT)SendDlgItemMessage(m_hwnd, IDC_TOPLINE, WM_GETFONT, 0, 0));
}

void onChange_Server(CCtrlCheck *pButton)
{
chkForEveryone.Enable(pButton->IsChecked());
}
};

static INT_PTR MenuItem_DeleteContact(WPARAM hContact, LPARAM lParam)
Expand Down

0 comments on commit 3693cff

Please sign in to comment.