@@ -12,8 +12,14 @@ import { useSubscription, useAutoSaveDraft } from '../hooks';
1212import sharedStyles from '../../../views/Styles' ;
1313import { useTheme } from '../../../theme' ;
1414import { userTyping } from '../../../actions/room' ;
15- import { getRoomTitle , parseJson } from '../../../lib/methods/helpers' ;
16- import { MAX_HEIGHT , MIN_HEIGHT , NO_CANNED_RESPONSES , MARKDOWN_STYLES } from '../constants' ;
15+ import { getRoomTitle , isTablet , parseJson } from '../../../lib/methods/helpers' ;
16+ import {
17+ MAX_HEIGHT ,
18+ MIN_HEIGHT ,
19+ NO_CANNED_RESPONSES ,
20+ MARKDOWN_STYLES ,
21+ COMPOSER_INPUT_PLACEHOLDER_MAX_LENGTH
22+ } from '../constants' ;
1723import database from '../../../lib/database' ;
1824import Navigation from '../../../lib/navigation/appNavigation' ;
1925import { emitter } from '../../../lib/methods/helpers/emitter' ;
@@ -44,6 +50,9 @@ export const ComposerInput = memo(
4450 let placeholder = tmid ? I18n . t ( 'Add_thread_reply' ) : '' ;
4551 if ( subscription && ! tmid ) {
4652 placeholder = I18n . t ( 'Message_roomname' , { roomName : ( subscription . t === 'd' ? '@' : '#' ) + getRoomTitle ( subscription ) } ) ;
53+ if ( ! isTablet && placeholder . length > COMPOSER_INPUT_PLACEHOLDER_MAX_LENGTH ) {
54+ placeholder = `${ placeholder . slice ( 0 , COMPOSER_INPUT_PLACEHOLDER_MAX_LENGTH ) } ...` ;
55+ }
4756 }
4857 const route = useRoute < RouteProp < ChatsStackParamList , 'RoomView' > > ( ) ;
4958 const usedCannedResponse = route . params ?. usedCannedResponse ;
0 commit comments