PLT-5707 Fix Threads title in DM channel (#322)
This commit is contained in:
parent
90bd750b97
commit
49c31620a8
2 changed files with 20 additions and 4 deletions
|
|
@ -7,6 +7,7 @@ import {
|
|||
View
|
||||
} from 'react-native';
|
||||
|
||||
import {Constants} from 'service/constants';
|
||||
import {getCurrentChannel} from 'service/selectors/entities/channels';
|
||||
import {getTheme} from 'service/selectors/entities/preferences';
|
||||
|
||||
|
|
@ -14,16 +15,30 @@ import FormattedText from 'app/components/formatted_text';
|
|||
|
||||
function ThreadTitle(props) {
|
||||
const {currentChannel, theme} = props;
|
||||
const channelName = currentChannel.display_name;
|
||||
|
||||
return (
|
||||
<View style={{alignItems: 'center', justifyContent: 'center', flex: 1, marginHorizontal: 50}}>
|
||||
let label;
|
||||
if (currentChannel.type === Constants.DM_CHANNEL) {
|
||||
label = (
|
||||
<FormattedText
|
||||
id='mobile.routes.thread_dm'
|
||||
defaultMessage='Direct Message Thread'
|
||||
style={{color: theme.sidebarHeaderTextColor, fontSize: 15, fontWeight: 'bold', textAlign: 'center'}}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
const channelName = currentChannel.display_name;
|
||||
label = (
|
||||
<FormattedText
|
||||
id='mobile.routes.thread'
|
||||
defaultMessage='{channelName} Thread'
|
||||
values={{channelName}}
|
||||
style={{color: theme.sidebarHeaderTextColor, fontSize: 15, fontWeight: 'bold', textAlign: 'center'}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={{alignItems: 'center', justifyContent: 'center', flex: 1, marginHorizontal: 50}}>
|
||||
{label}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1524,6 +1524,7 @@
|
|||
"mobile.routes.channel_members.action_message": "You must select at least one member to {term} {prep} the channel.",
|
||||
"mobile.routes.channel_members.action_message_confirm": "Are you sure you want to {term} the selected members {prep} the channel?",
|
||||
"mobile.routes.thread": "{channelName} Thread",
|
||||
"mobile.routes.thread_dm": "Direct Message Thread",
|
||||
"mobile.routes.user_profile": "Profile",
|
||||
"mobile.routes.user_profile.send_message": "Send Message",
|
||||
"mobile.server_ping_failed": "Cannot connect to the server. Please check your server URL and internet connection.",
|
||||
|
|
|
|||
Loading…
Reference in a new issue