Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Cannot edit or delete custom sounds #8889

Merged
merged 2 commits into from
Dec 4, 2017

Conversation

ccfang
Copy link
Contributor

@ccfang ccfang commented Nov 17, 2017

@RocketChat/core

Just a minor bug when i would like to upload custom sound and find no way to delete it.

@@ -90,15 +90,15 @@ Template.soundInfo.onCreated(function() {

this.autorun(() => {
const data = Template.currentData();
if (data.clear != null) {
if (data != null && data.clear != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can change that to if (data && data.clear !== null) :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thank you for your comment.

this.clear = data.clear;
}
});

this.autorun(() => {
const data = Template.currentData();
const sound = this.sound.get();
if (sound.name != null) {
if (sound != null && sound.name != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Contributor Author

@ccfang ccfang Nov 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.
By the way, i just let it the same with the emojiInfo.js in the beginning

Copy link
Contributor Author

@ccfang ccfang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update if statement

@@ -90,15 +90,15 @@ Template.soundInfo.onCreated(function() {

this.autorun(() => {
const data = Template.currentData();
if (data.clear != null) {
if (data != null && data.clear != null) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, thank you for your comment.

this.clear = data.clear;
}
});

this.autorun(() => {
const data = Template.currentData();
const sound = this.sound.get();
if (sound.name != null) {
if (sound != null && sound.name != null) {
Copy link
Contributor Author

@ccfang ccfang Nov 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK.
By the way, i just let it the same with the emojiInfo.js in the beginning

@graywolf336
Copy link
Contributor

@karlprieb do you mind reviewing again?

@graywolf336 graywolf336 added this to the 0.60.0 milestone Dec 4, 2017
@rodrigok rodrigok changed the title [FIX] Fix custom sound cannot edit and delete problem [FIX] Cannot edit or delete custom sounds Dec 4, 2017
@rodrigok rodrigok merged commit 5feec6a into RocketChat:develop Dec 4, 2017
@ccfang ccfang deleted the fix-custom-sound-cannot-edit branch December 5, 2017 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants