Merge branch 'MDL-64043-master' of git://github.com/ryanwyllie/moodle

This commit is contained in:
Sara Arjona 2019-01-09 17:55:34 +01:00
commit c2fc318d4e
2 changed files with 7 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -322,11 +322,10 @@ function(
* @return {Object} patch
*/
var buildHeaderPatchTypePublic = function(state, newState) {
var totalMemberCount = newState.totalMemberCount;
var oldMemberCount = state.totalMemberCount;
var newMemberCount = newState.totalMemberCount;
if (totalMemberCount === null) {
return null;
} else {
if (oldMemberCount != newMemberCount) {
return {
type: Constants.CONVERSATION_TYPES.PUBLIC,
showControls: true,
@ -334,13 +333,15 @@ function(
id: newState.id,
name: newState.name,
subname: newState.subname,
totalmembercount: totalMemberCount,
totalmembercount: newState.totalMemberCount,
imageurl: newState.imageUrl,
isfavourite: newState.isFavourite,
// Don't show favouriting if we don't have a conversation.
showfavourite: newState.id !== null
}
};
} else {
return null;
}
};