mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 22:14:58 +08:00
fix tag unsetting https://github.com/vector-im/vector-web/issues/1499 - HOW DID THIS EVER WORK?!?!
This commit is contained in:
parent
b74d690035
commit
2662ca36f9
@ -34,7 +34,7 @@ module.exports = React.createClass({
|
|||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
var tags = {};
|
var tags = {};
|
||||||
Object.keys(this.props.room.tags).forEach(function(tagName) {
|
Object.keys(this.props.room.tags).forEach(function(tagName) {
|
||||||
tags[tagName] = {};
|
tags[tagName] = ['yep'];
|
||||||
});
|
});
|
||||||
|
|
||||||
var areNotifsMuted = false;
|
var areNotifsMuted = false;
|
||||||
@ -180,7 +180,7 @@ module.exports = React.createClass({
|
|||||||
// tags
|
// tags
|
||||||
if (this.state.tags_changed) {
|
if (this.state.tags_changed) {
|
||||||
var tagDiffs = ObjectUtils.getKeyValueArrayDiffs(originalState.tags, this.state.tags);
|
var tagDiffs = ObjectUtils.getKeyValueArrayDiffs(originalState.tags, this.state.tags);
|
||||||
// [ {place: add, key: "m.favourite", val: "yep"} ]
|
// [ {place: add, key: "m.favourite", val: ["yep"]} ]
|
||||||
tagDiffs.forEach(function(diff) {
|
tagDiffs.forEach(function(diff) {
|
||||||
switch (diff.place) {
|
switch (diff.place) {
|
||||||
case "add":
|
case "add":
|
||||||
|
Loading…
Reference in New Issue
Block a user