diff --git a/ios/Podfile b/ios/Podfile index 0b519d2e1cdd..31d6f48f09e0 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -23,12 +23,3 @@ target 'ReactNativeChat' do flipper_post_install(installer) end end - -target 'ReactNativeChat-tvOS' do - # Pods for ReactNativeChat-tvOS - - target 'ReactNativeChat-tvOSTests' do - inherit! :search_paths - # Pods for testing - end -end diff --git a/src/page/HomePage/Report/ReportHistoryView.js b/src/page/HomePage/Report/ReportHistoryView.js index b9bbf75ff495..a5165ce681cf 100644 --- a/src/page/HomePage/Report/ReportHistoryView.js +++ b/src/page/HomePage/Report/ReportHistoryView.js @@ -19,22 +19,10 @@ class ReportHistoryView extends React.Component { constructor(props) { super(props); - // Keeps track of the history length so that when length changes, the list is scrolled to the bottom - this.previousReportHistoryLength = 0; - this.itemsAreRendered = false; - this.recordlastReadActionID = _.debounce(this.recordlastReadActionID.bind(this), 1000, true); this.scrollToBottomWhenListSizeChanges = this.scrollToBottomWhenListSizeChanges.bind(this); } - componentDidUpdate(prevProps) { - // Reset the previous history length when the props change - if (this.props.reportID !== prevProps.reportID) { - this.previousReportHistoryLength = 0; - this.itemsAreRendered = false; - } - } - /** * Returns the report history with everything but comments filtered out * @@ -120,15 +108,8 @@ class ReportHistoryView extends React.Component { * scroll the list to the end. */ scrollToBottomWhenListSizeChanges() { - if (this.historyListElement) { - const filteredHistory = this.getFilteredReportHistory(); - if (this.previousReportHistoryLength < filteredHistory.length) { - this.historyListElement.scrollToEnd({animated: false}); - this.recordMaxAction(); - } - - this.previousReportHistoryLength = filteredHistory.length; - } + this.historyListElement.scrollToEnd({animated: false}); + this.recordMaxAction(); } render() { @@ -146,8 +127,9 @@ class ReportHistoryView extends React.Component { { this.historyListElement = el; - this.scrollToBottomWhenListSizeChanges(); }} + onContentSizeChange={this.scrollToBottomWhenListSizeChanges} + bounces={false} > {_.map(filteredHistory, (item, index) => ( - {this.props.reportName} + {this.props.reportName} {this.state && this.state.isUnread && ( )} diff --git a/src/style/StyleSheet.js b/src/style/StyleSheet.js index 2ef9cc9a92ad..edd8ddbcd8ce 100644 --- a/src/style/StyleSheet.js +++ b/src/style/StyleSheet.js @@ -108,7 +108,7 @@ const styles = { sidebarFooterAvatar: { backgroundColor: colors.text, - borderRadius: '50%', + borderRadius: 20, height: 40, marginRight: 12, width: 40, @@ -127,8 +127,9 @@ const styles = { }, sidebarListContainer: { - flexBasis: 'inherit', + flex: 1, flexGrow: 1, + scrollbarWidth: 'none', overflow: 'scroll', paddingTop: 4, paddingBottom: 4, @@ -149,7 +150,7 @@ const styles = { sidebarListItem: { height: 40, justifyContent: 'center', - textDecoration: 'none', + textDecorationLine: 'none', }, sidebarLink: { @@ -158,7 +159,7 @@ const styles = { paddingRight: 12, paddingBottom: 8, paddingLeft: 12, - textDecoration: 'none', + textDecorationLine: 'none', }, sidebarLinkInner: { @@ -170,10 +171,8 @@ const styles = { sidebarLinkText: { color: '#C6C9CA', fontSize: 13, - textDecoration: 'none', - whiteSpace: 'nowrap', + textDecorationLine: 'none', overflow: 'hidden', - textOverflow: 'ellipsis', }, sidebarLinkActive: { @@ -184,16 +183,14 @@ const styles = { paddingRight: 12, paddingBottom: 8, paddingLeft: 12, - textDecoration: 'none', + textDecorationLine: 'none', }, sidebarLinkActiveText: { color: '#ffffff', fontSize: 13, - textDecoration: 'none', - whiteSpace: 'nowrap', + textDecorationLine: 'none', overflow: 'hidden', - textOverflow: 'ellipsis', }, unreadBadge: { @@ -302,7 +299,7 @@ const styles = { chatItemCompose: { borderTopWidth: 1, borderTopColor: colors.border, - minHeight: '85', + minHeight: 85, paddingTop: 20, paddingBottom: 20, paddingLeft: 16,