Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: messages: Do not close keyboard when tapping messages #2157

Closed
Closed
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
33 changes: 20 additions & 13 deletions src/chat/Chat.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* @flow */
import React, { PureComponent } from 'react';
import { View } from 'react-native';
import { ScrollView, View } from 'react-native';

import type { Narrow } from '../types';
import { KeyboardAvoider, OfflineNotice } from '../common';
Expand Down Expand Up @@ -41,24 +41,31 @@ export default class Chat extends PureComponent<Props> {

return (
<KeyboardAvoider style={styles.flexed} behavior="padding">
<View style={styles.flexed}>
<OfflineNotice />
<UnreadNotice narrow={narrow} />
<NoMessages narrow={narrow} />
<MessageListContainer
narrow={narrow}
onReplySelect={this.handleReplySelect}
listRef={component => {
this.listComponent = component || this.listComponent;
}}
/>
<OfflineNotice />
<UnreadNotice narrow={narrow} />
<NoMessages narrow={narrow} />
<ScrollView
bounces={false}
contentContainerStyle={styles.flexed}
keyboardShouldPersistTaps="always"
overScrollMode="never"
>
<View style={styles.flexed}>
<MessageListContainer
narrow={narrow}
onReplySelect={this.handleReplySelect}
listRef={component => {
this.listComponent = component || this.listComponent;
}}
/>
</View>
<ComposeBoxContainer
narrow={narrow}
messageInputRef={(component: any) => {
this.messageInputRef = component || this.messageInputRef;
}}
/>
</View>
</ScrollView>
</KeyboardAvoider>
);
}
Expand Down