[FIX] AttachmentView (Android)(Tablet) (#2047)

* [fix]Tablet attachment View and Room Navigation

* fix weird navigation and margin bottom

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
Siddharth Padhi 2020-04-30 23:41:34 +05:30 committed by GitHub
parent a52056988e
commit 6d80f147ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 25 deletions

View File

@ -514,7 +514,7 @@ class CustomModalStack extends React.Component {
const pageSheetViews = ['AttachmentView'];
const pageSheet = pageSheetViews.includes(getActiveRouteName(navigation.state));
const androidProps = isAndroid && {
const androidProps = isAndroid && !pageSheet && {
style: { marginBottom: 0 }
};
@ -524,7 +524,7 @@ class CustomModalStack extends React.Component {
</View>
);
if (isAndroid) {
if (isAndroid && !pageSheet) {
content = (
<ScrollView overScrollMode='never'>
{content}

View File

@ -87,6 +87,7 @@ class RoomActionsView extends React.Component {
async componentDidMount() {
this.mounted = true;
const { room, member } = this.state;
if (room.rid) {
if (!room.id) {
try {
const result = await RocketChat.getChannelInfo(room.rid);
@ -117,6 +118,7 @@ class RoomActionsView extends React.Component {
this.canAddUser();
this.canInviteUser();
}
}
componentWillUnmount() {
if (this.subscription && this.subscription.unsubscribe) {