Merge remote-tracking branch 'origin/develop' into develop
commit
bc0c27f517
|
@ -37,6 +37,11 @@ import GroupStore from '../../../stores/GroupStore';
|
||||||
const HIDE_CONFERENCE_CHANS = true;
|
const HIDE_CONFERENCE_CHANS = true;
|
||||||
const STANDARD_TAGS_REGEX = /^(m\.(favourite|lowpriority)|im\.vector\.fake\.(invite|recent|direct|archived))$/;
|
const STANDARD_TAGS_REGEX = /^(m\.(favourite|lowpriority)|im\.vector\.fake\.(invite|recent|direct|archived))$/;
|
||||||
|
|
||||||
|
function labelForTagName(tagName) {
|
||||||
|
if (tagName.startsWith('u.')) return tagName.slice(2);
|
||||||
|
return tagName;
|
||||||
|
}
|
||||||
|
|
||||||
function phraseForSection(section) {
|
function phraseForSection(section) {
|
||||||
switch (section) {
|
switch (section) {
|
||||||
case 'm.favourite':
|
case 'm.favourite':
|
||||||
|
@ -690,7 +695,7 @@ module.exports = React.createClass({
|
||||||
if (!tagName.match(STANDARD_TAGS_REGEX)) {
|
if (!tagName.match(STANDARD_TAGS_REGEX)) {
|
||||||
return <RoomSubList list={self.state.lists[tagName]}
|
return <RoomSubList list={self.state.lists[tagName]}
|
||||||
key={tagName}
|
key={tagName}
|
||||||
label={tagName}
|
label={labelForTagName(tagName)}
|
||||||
tagName={tagName}
|
tagName={tagName}
|
||||||
emptyContent={this._getEmptyContent(tagName)}
|
emptyContent={this._getEmptyContent(tagName)}
|
||||||
editable={true}
|
editable={true}
|
||||||
|
|
|
@ -194,6 +194,11 @@ class RoomListStore extends Store {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ignore any m. tag names we don't know about
|
||||||
|
tagNames = tagNames.filter((t) => {
|
||||||
|
return !t.startsWith('m.') || lists[t] !== undefined;
|
||||||
|
});
|
||||||
|
|
||||||
if (tagNames.length) {
|
if (tagNames.length) {
|
||||||
for (let i = 0; i < tagNames.length; i++) {
|
for (let i = 0; i < tagNames.length; i++) {
|
||||||
const tagName = tagNames[i];
|
const tagName = tagNames[i];
|
||||||
|
|
Loading…
Reference in New Issue