// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React from 'react';
import {Animated, View} from 'react-native';
import Autocomplete from '@components/autocomplete';
import Loading from '@components/loading';
import PostDraft from '@components/post_draft';
import PostList from '@components/post_list';
import SafeAreaView from '@components/safe_area_view';
import StatusBar from '@components/status_bar';
import DEVICE from '@constants/device';
import {THREAD_POST_TEXTBOX_CURSOR_CHANGE, THREAD_POST_TEXTBOX_VALUE_CHANGE} from '@constants/post_draft';
import {THREAD} from '@constants/screen';
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
import ThreadBase from './thread_base';
const ACCESSORIES_CONTAINER_NATIVE_ID = 'threadAccessoriesContainer';
const SCROLLVIEW_NATIVE_ID = 'threadPostList';
export default class ThreadIOS extends ThreadBase {
handleAutoComplete = (value) => {
if (this.postDraft?.current) {
this.postDraft.current.handleInputQuickAction(value);
}
};
render() {
const {
channelId,
myMember,
postIds,
rootId,
channelIsArchived,
collapsedThreadsEnabled,
theme,
} = this.props;
let content;
let postDraft;
if (this.hasRootPost()) {
content = (
<>
>
);
postDraft = (
);
} else {
content = (
);
}
const style = getStyleSheet(theme);
return (
{content}
{postDraft}
);
}
}
const getStyleSheet = makeStyleSheetFromTheme((theme) => ({
separator: {
backgroundColor: changeOpacity(theme.centerChannelColor, 0.2),
height: 1,
},
}));