Disable GIF button if exceed max media limit or has poll

This commit is contained in:
Lim Chee Aun 2024-06-01 11:51:58 +08:00
parent 224cad4d7f
commit 5ead17a093

View file

@ -1342,7 +1342,11 @@ function Compose({
<button
type="button"
class="toolbar-button gif-picker-button"
disabled={uiState === 'loading'}
disabled={
uiState === 'loading' ||
mediaAttachments.length >= maxMediaAttachments ||
!!poll
}
onClick={() => {
setShowGIFPicker(true);
}}