[IMPROVEMENT] Add "Message" option to Room Info (#3029)
* [CHORE] Go to room from hashtag * Layout tweaks Co-authored-by: Diego Mello <diegolmello@gmail.com>
This commit is contained in:
parent
656127aaab
commit
0ff916dc50
|
@ -306,7 +306,9 @@ class RoomInfoView extends React.Component {
|
|||
|
||||
const onActionPress = async() => {
|
||||
try {
|
||||
await this.createDirect();
|
||||
if (this.isDirect) {
|
||||
await this.createDirect();
|
||||
}
|
||||
onPress();
|
||||
} catch {
|
||||
EventEmitter.emit(LISTENER, { message: I18n.t('error-action-not-allowed', { action: I18n.t('Create_Direct_Messages') }) });
|
||||
|
@ -333,7 +335,7 @@ class RoomInfoView extends React.Component {
|
|||
return (
|
||||
<View style={styles.roomButtonsContainer}>
|
||||
{this.renderButton(this.goRoom, 'message', I18n.t('Message'))}
|
||||
{jitsiEnabled ? this.renderButton(this.videoCall, 'camera', I18n.t('Video_call')) : null}
|
||||
{jitsiEnabled && this.isDirect ? this.renderButton(this.videoCall, 'camera', I18n.t('Video_call')) : null}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
@ -360,10 +362,10 @@ class RoomInfoView extends React.Component {
|
|||
style={{ backgroundColor: themes[theme].backgroundColor }}
|
||||
testID='room-info-view'
|
||||
>
|
||||
<View style={[styles.avatarContainer, this.isDirect && styles.avatarContainerDirectRoom, { backgroundColor: themes[theme].auxiliaryBackground }]}>
|
||||
<View style={[styles.avatarContainer, { backgroundColor: themes[theme].auxiliaryBackground }]}>
|
||||
{this.renderAvatar(room, roomUser)}
|
||||
<View style={styles.roomTitleContainer}>{ getRoomTitle(room, this.t, roomUser?.name, roomUser?.username, roomUser?.statusText, theme) }</View>
|
||||
{this.isDirect ? this.renderButtons() : null}
|
||||
{this.renderButtons()}
|
||||
</View>
|
||||
{this.renderContent()}
|
||||
</SafeAreaView>
|
||||
|
|
|
@ -16,15 +16,12 @@ export default StyleSheet.create({
|
|||
justifyContent: 'center'
|
||||
},
|
||||
avatarContainer: {
|
||||
minHeight: 240,
|
||||
minHeight: 320,
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
marginBottom: 20
|
||||
},
|
||||
avatarContainerDirectRoom: {
|
||||
paddingVertical: 16,
|
||||
minHeight: 320
|
||||
marginBottom: 20,
|
||||
paddingVertical: 8
|
||||
},
|
||||
avatar: {
|
||||
marginHorizontal: 10
|
||||
|
|
Loading…
Reference in New Issue