forked from Ivasoft/mattermost-mobile
* Fix autocomplete showing behind the keyboard on iOS and not working on Android * Unbundle config for Android * Dismiss keyboard on post long press, fix scroll to bottom on new message and update tests * Add a timeout before scrolling to give time to render the last post * Fix crash on Android
58 lines
2.1 KiB
JavaScript
58 lines
2.1 KiB
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import React from 'react';
|
|
import {Dimensions, View} from 'react-native';
|
|
|
|
import ChannelLoader from 'app/components/channel_loader';
|
|
import KeyboardLayout from 'app/components/layout/keyboard_layout';
|
|
import NetworkIndicator from 'app/components/network_indicator';
|
|
import SafeAreaView from 'app/components/safe_area_view';
|
|
import StatusBar from 'app/components/status_bar';
|
|
import PostTextbox from 'app/components/post_textbox';
|
|
import LocalConfig from 'assets/config';
|
|
|
|
import ChannelNavBar from './channel_nav_bar';
|
|
import ChannelPostList from './channel_post_list';
|
|
|
|
import ChannelBase, {ClientUpgradeListener, style} from './channel_base';
|
|
|
|
export default class ChannelAndroid extends ChannelBase {
|
|
render() {
|
|
const {height} = Dimensions.get('window');
|
|
const {
|
|
navigator,
|
|
} = this.props;
|
|
|
|
const channelLoaderStyle = [style.channelLoader, {height}];
|
|
const drawerContent = (
|
|
<SafeAreaView navigator={navigator}>
|
|
<StatusBar/>
|
|
<NetworkIndicator/>
|
|
<ChannelNavBar
|
|
navigator={navigator}
|
|
openChannelDrawer={this.openChannelSidebar}
|
|
openSettingsDrawer={this.openSettingsSidebar}
|
|
onPress={this.goToChannelInfo}
|
|
/>
|
|
<KeyboardLayout>
|
|
<View style={style.flex}>
|
|
<ChannelPostList navigator={navigator}/>
|
|
</View>
|
|
<PostTextbox
|
|
ref={this.postTextbox}
|
|
navigator={navigator}
|
|
/>
|
|
</KeyboardLayout>
|
|
<ChannelLoader
|
|
height={height}
|
|
style={channelLoaderStyle}
|
|
/>
|
|
{LocalConfig.EnableMobileClientUpgrade && <ClientUpgradeListener navigator={navigator}/>}
|
|
</SafeAreaView>
|
|
);
|
|
|
|
return this.renderChannel(drawerContent);
|
|
}
|
|
}
|