@@ -5,7 +5,6 @@ import {InteractionManager, Keyboard, View} from 'react-native';
5
5
import PropTypes from 'prop-types' ;
6
6
import _ from 'underscore' ;
7
7
import ExpensiMark from 'expensify-common/lib/ExpensiMark' ;
8
- import { withOnyx } from 'react-native-onyx' ;
9
8
import reportActionPropTypes from './reportActionPropTypes' ;
10
9
import styles from '../../../styles/styles' ;
11
10
import Composer from '../../../components/Composer' ;
@@ -26,7 +25,6 @@ import CONST from '../../../CONST';
26
25
import withWindowDimensions , { windowDimensionsPropTypes } from '../../../components/withWindowDimensions' ;
27
26
import withLocalize , { withLocalizePropTypes } from '../../../components/withLocalize' ;
28
27
import withKeyboardState , { keyboardStatePropTypes } from '../../../components/withKeyboardState' ;
29
- import ONYXKEYS from '../../../ONYXKEYS' ;
30
28
import * as ComposerUtils from '../../../libs/ComposerUtils' ;
31
29
32
30
const propTypes = {
@@ -36,9 +34,6 @@ const propTypes = {
36
34
/** Draft message */
37
35
draftMessage : PropTypes . string . isRequired ,
38
36
39
- /** Number of lines for the draft message */
40
- numberOfLines : PropTypes . number ,
41
-
42
37
/** ReportID that holds the comment we're editing */
43
38
reportID : PropTypes . string . isRequired ,
44
39
@@ -67,7 +62,6 @@ const defaultProps = {
67
62
forwardedRef : ( ) => { } ,
68
63
report : { } ,
69
64
shouldDisableEmojiPicker : false ,
70
- numberOfLines : undefined ,
71
65
preferredSkinTone : CONST . EMOJI_DEFAULT_SKIN_TONE ,
72
66
} ;
73
67
@@ -82,7 +76,6 @@ class ReportActionItemMessageEdit extends React.Component {
82
76
this . onSelectionChange = this . onSelectionChange . bind ( this ) ;
83
77
this . addEmojiToTextBox = this . addEmojiToTextBox . bind ( this ) ;
84
78
this . setExceededMaxCommentLength = this . setExceededMaxCommentLength . bind ( this ) ;
85
- this . updateNumberOfLines = this . updateNumberOfLines . bind ( this ) ;
86
79
this . saveButtonID = 'saveButton' ;
87
80
this . cancelButtonID = 'cancelButton' ;
88
81
this . emojiButtonID = 'emojiButton' ;
@@ -160,14 +153,6 @@ class ReportActionItemMessageEdit extends React.Component {
160
153
}
161
154
}
162
155
163
- /**
164
- * Update the number of lines for a draft in Onyx
165
- * @param {Number } numberOfLines
166
- */
167
- updateNumberOfLines ( numberOfLines ) {
168
- Report . saveReportActionDraftNumberOfLines ( this . props . reportID , this . props . action . reportActionID , numberOfLines ) ;
169
- }
170
-
171
156
/**
172
157
* Delete the draft of the comment being edited. This will take the comment out of "edit mode" with the old content.
173
158
*/
@@ -303,8 +288,6 @@ class ReportActionItemMessageEdit extends React.Component {
303
288
} }
304
289
selection = { this . state . selection }
305
290
onSelectionChange = { this . onSelectionChange }
306
- numberOfLines = { this . props . numberOfLines }
307
- onNumberOfLinesChange = { this . updateNumberOfLines }
308
291
/>
309
292
< View style = { styles . editChatItemEmojiWrapper } >
310
293
< EmojiPickerButton
@@ -346,12 +329,6 @@ export default compose(
346
329
withLocalize ,
347
330
withWindowDimensions ,
348
331
withKeyboardState ,
349
- withOnyx ( {
350
- numberOfLines : {
351
- key : ( { reportID, action} ) => `${ ONYXKEYS . COLLECTION . REPORT_DRAFT_COMMENT_NUMBER_OF_LINES } ${ reportID } _${ action . reportActionID } ` ,
352
- initWithStoredValues : false ,
353
- } ,
354
- } ) ,
355
332
) ( React . forwardRef ( ( props , ref ) => (
356
333
/* eslint-disable-next-line react/jsx-props-no-spreading */
357
334
< ReportActionItemMessageEdit { ...props } forwardedRef = { ref } />
0 commit comments