mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
chat: reducer handles metadata removal
This commit is contained in:
parent
ab793f1f70
commit
56d1630888
@ -7,6 +7,7 @@ export class MetadataReducer {
|
||||
this.associations(data, state);
|
||||
this.add(data, state);
|
||||
this.update(data, state);
|
||||
this.remove(data, state);
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,4 +40,13 @@ export class MetadataReducer {
|
||||
state.associations = metadata;
|
||||
}
|
||||
}
|
||||
|
||||
remove(json, state) {
|
||||
let data = _.get(json, 'remove', false);
|
||||
if (data) {
|
||||
let metadata = state.associations;
|
||||
metadata.delete(data["app-path"]);
|
||||
state.associations = metadata;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user