| 99 | } |
| 100 | |
| 101 | void MessageEditor::UpdateTextBox() |
| 102 | { |
| 103 | bool mayType = GetDiscordInstance()->GetCurrentChannel() && GetDiscordInstance()->GetCurrentChannel()->HasPermission(PERM_SEND_MESSAGES); |
| 104 | bool wasDisabled = EnableWindow(m_edit_hwnd, mayType); |
| 105 | EnableWindow(m_send_hwnd, mayType); |
| 106 | |
| 107 | if (mayType && wasDisabled) { |
| 108 | SetWindowText(m_edit_hwnd, TEXT("")); |
| 109 | } |
| 110 | if (!mayType && !wasDisabled) { |
| 111 | SetWindowText(m_edit_hwnd, TmGetTString(IDS_CANT_SEND_MESSAGES)); |
| 112 | } |
| 113 | } |
| 114 | |
| 115 | void MessageEditor::ShowOrHideReply(bool shown) |
| 116 | { |
no test coverage detected