[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:
parent
a52056988e
commit
6d80f147ac
|
@ -514,7 +514,7 @@ class CustomModalStack extends React.Component {
|
||||||
const pageSheetViews = ['AttachmentView'];
|
const pageSheetViews = ['AttachmentView'];
|
||||||
const pageSheet = pageSheetViews.includes(getActiveRouteName(navigation.state));
|
const pageSheet = pageSheetViews.includes(getActiveRouteName(navigation.state));
|
||||||
|
|
||||||
const androidProps = isAndroid && {
|
const androidProps = isAndroid && !pageSheet && {
|
||||||
style: { marginBottom: 0 }
|
style: { marginBottom: 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -524,7 +524,7 @@ class CustomModalStack extends React.Component {
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isAndroid) {
|
if (isAndroid && !pageSheet) {
|
||||||
content = (
|
content = (
|
||||||
<ScrollView overScrollMode='never'>
|
<ScrollView overScrollMode='never'>
|
||||||
{content}
|
{content}
|
||||||
|
|
|
@ -87,35 +87,37 @@ class RoomActionsView extends React.Component {
|
||||||
async componentDidMount() {
|
async componentDidMount() {
|
||||||
this.mounted = true;
|
this.mounted = true;
|
||||||
const { room, member } = this.state;
|
const { room, member } = this.state;
|
||||||
if (!room.id) {
|
if (room.rid) {
|
||||||
try {
|
if (!room.id) {
|
||||||
const result = await RocketChat.getChannelInfo(room.rid);
|
try {
|
||||||
if (result.success) {
|
const result = await RocketChat.getChannelInfo(room.rid);
|
||||||
this.setState({ room: { ...result.channel, rid: result.channel._id } });
|
if (result.success) {
|
||||||
|
this.setState({ room: { ...result.channel, rid: result.channel._id } });
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
log(e);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
|
||||||
log(e);
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (room && room.t !== 'd' && this.canViewMembers()) {
|
if (room && room.t !== 'd' && this.canViewMembers()) {
|
||||||
try {
|
try {
|
||||||
const counters = await RocketChat.getRoomCounters(room.rid, room.t);
|
const counters = await RocketChat.getRoomCounters(room.rid, room.t);
|
||||||
if (counters.success) {
|
if (counters.success) {
|
||||||
this.setState({ membersCount: counters.members, joined: counters.joined });
|
this.setState({ membersCount: counters.members, joined: counters.joined });
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
log(e);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} else if (room.t === 'd' && _.isEmpty(member)) {
|
||||||
log(e);
|
this.updateRoomMember();
|
||||||
}
|
}
|
||||||
} else if (room.t === 'd' && _.isEmpty(member)) {
|
|
||||||
this.updateRoomMember();
|
const canAutoTranslate = await RocketChat.canAutoTranslate();
|
||||||
|
this.setState({ canAutoTranslate });
|
||||||
|
|
||||||
|
this.canAddUser();
|
||||||
|
this.canInviteUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
const canAutoTranslate = await RocketChat.canAutoTranslate();
|
|
||||||
this.setState({ canAutoTranslate });
|
|
||||||
|
|
||||||
this.canAddUser();
|
|
||||||
this.canInviteUser();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
|
Loading…
Reference in New Issue