Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 4 additions & 22 deletions src/page/HomePage/Report/ReportHistoryView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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() {
Expand All @@ -146,8 +127,9 @@ class ReportHistoryView extends React.Component {
<ScrollView
ref={(el) => {
this.historyListElement = el;
this.scrollToBottomWhenListSizeChanges();
}}
onContentSizeChange={this.scrollToBottomWhenListSizeChanges}
bounces={false}
>
{_.map(filteredHistory, (item, index) => (
<ReportHistoryItem
Expand Down
2 changes: 1 addition & 1 deletion src/page/HomePage/SidebarLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SidebarLink extends React.Component {
<View style={[styles.sidebarListItem, linkWrapperActiveStyle]}>
<Link to={`/${this.props.reportID}`} style={linkActiveStyle}>
<View style={[styles.sidebarLinkInner]}>
<Text style={[textActiveStyle, styles.flex1]}>{this.props.reportName}</Text>
<Text numberOfLines={1} style={[textActiveStyle, styles.flex1]}>{this.props.reportName}</Text>
{this.state && this.state.isUnread && (
<View style={styles.unreadBadge} />
)}
Expand Down
21 changes: 9 additions & 12 deletions src/style/StyleSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const styles = {

sidebarFooterAvatar: {
backgroundColor: colors.text,
borderRadius: '50%',
borderRadius: 20,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawnborton - borderRadius can only be a number, so had to divide height/width by 2 manually.

height: 40,
marginRight: 12,
width: 40,
Expand All @@ -127,8 +127,9 @@ const styles = {
},

sidebarListContainer: {
flexBasis: 'inherit',
Comment thread
AndrewGable marked this conversation as resolved.
flex: 1,
flexGrow: 1,
scrollbarWidth: 'none',
overflow: 'scroll',
paddingTop: 4,
paddingBottom: 4,
Expand All @@ -149,7 +150,7 @@ const styles = {
sidebarListItem: {
height: 40,
justifyContent: 'center',
textDecoration: 'none',
textDecorationLine: 'none',

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were just missing Line on this one

},

sidebarLink: {
Expand All @@ -158,7 +159,7 @@ const styles = {
paddingRight: 12,
paddingBottom: 8,
paddingLeft: 12,
textDecoration: 'none',
textDecorationLine: 'none',
},

sidebarLinkInner: {
Expand All @@ -170,10 +171,8 @@ const styles = {
sidebarLinkText: {
color: '#C6C9CA',
fontSize: 13,
textDecoration: 'none',
whiteSpace: 'nowrap',
textDecorationLine: 'none',
overflow: 'hidden',
textOverflow: 'ellipsis',
Comment thread
AndrewGable marked this conversation as resolved.
},

sidebarLinkActive: {
Expand All @@ -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: {
Expand Down Expand Up @@ -302,7 +299,7 @@ const styles = {
chatItemCompose: {
borderTopWidth: 1,
borderTopColor: colors.border,
minHeight: '85',
minHeight: 85,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

String -> Number

paddingTop: 20,
paddingBottom: 20,
paddingLeft: 16,
Expand Down