@@ -8,7 +8,7 @@ import { isDefined } from '@js/core/utils/type';
88import DataHelperMixin from '@js/data_helper' ;
99import type dxChat from '@js/ui/chat' ;
1010import type {
11- AttachmentDownloadEvent ,
11+ AttachmentDownloadClickEvent ,
1212 Message ,
1313 MessageDeletedEvent ,
1414 MessageDeletingEvent ,
@@ -74,7 +74,7 @@ class Chat extends Widget<Properties> {
7474
7575 _messageUpdatedAction ?: ( e : Partial < MessageUpdatedEvent > ) => void ;
7676
77- _attachmentDownloadAction ?: ( e : Partial < AttachmentDownloadEvent > ) => void ;
77+ _attachmentDownloadAction ?: ( e : Partial < AttachmentDownloadClickEvent > ) => void ;
7878
7979 _getDefaultOptions ( ) : Properties {
8080 return {
@@ -108,7 +108,7 @@ class Chat extends Widget<Properties> {
108108 onMessageEntered : undefined ,
109109 onTypingEnd : undefined ,
110110 onTypingStart : undefined ,
111- onAttachmentDownload : undefined ,
111+ onAttachmentDownloadClick : undefined ,
112112 } ;
113113 }
114114
@@ -201,7 +201,7 @@ class Chat extends Widget<Properties> {
201201 // @ts -expect-error
202202 const isLoading = this . _dataController . isLoading ( ) ;
203203 const currentUserId = user ?. id ;
204- const onAttachmentDownload = this . _getAttachmentDownloadHandler ( ) ;
204+ const onAttachmentDownloadClick = this . _getAttachmentDownloadHandler ( ) ;
205205
206206 const options : MessageListProperties = {
207207 items,
@@ -230,21 +230,21 @@ class Chat extends Widget<Properties> {
230230 onEscapeKeyPressed : ( ) => {
231231 this . focus ( ) ;
232232 } ,
233- onAttachmentDownload ,
233+ onAttachmentDownloadClick ,
234234 } ;
235235
236236 return options ;
237237 }
238238
239- _getAttachmentDownloadHandler ( ) : ( ( e : AttachmentDownloadEvent ) => void ) | undefined {
240- const { onAttachmentDownload } = this . option ( ) ;
239+ _getAttachmentDownloadHandler ( ) : ( ( e : AttachmentDownloadClickEvent ) => void ) | undefined {
240+ const { onAttachmentDownloadClick } = this . option ( ) ;
241241
242- if ( ! onAttachmentDownload ) {
242+ if ( ! onAttachmentDownloadClick ) {
243243 return ;
244244 }
245245
246246 // eslint-disable-next-line consistent-return
247- return ( e : AttachmentDownloadEvent ) : void => { this . _attachmentDownloadAction ?.( e ) ; } ;
247+ return ( e : AttachmentDownloadClickEvent ) : void => { this . _attachmentDownloadAction ?.( e ) ; } ;
248248 }
249249
250250 protected _allowEditAction ( message : Message ) : boolean {
@@ -541,7 +541,7 @@ class Chat extends Widget<Properties> {
541541
542542 _createAttachmentDownloadAction ( ) : void {
543543 this . _attachmentDownloadAction = this . _createActionByOption (
544- 'onAttachmentDownload ' ,
544+ 'onAttachmentDownloadClick ' ,
545545 { excludeValidators : [ 'disabled' ] } ,
546546 ) ;
547547 }
@@ -653,9 +653,11 @@ class Chat extends Widget<Properties> {
653653 case 'onTypingEnd' :
654654 this . _createTypingEndAction ( ) ;
655655 break ;
656- case 'onAttachmentDownload ' :
656+ case 'onAttachmentDownloadClick ' :
657657 this . _createAttachmentDownloadAction ( ) ;
658- this . _messageList . option ( { onAttachmentDownload : this . _getAttachmentDownloadHandler ( ) } ) ;
658+ this . _messageList . option ( {
659+ onAttachmentDownloadClick : this . _getAttachmentDownloadHandler ( ) ,
660+ } ) ;
659661 break ;
660662 case 'showDayHeaders' :
661663 case 'showAvatar' :
0 commit comments