Clear feed url after adding successfully

This commit is contained in:
turt2live 2017-05-28 22:57:40 -06:00
parent 58feb07119
commit e6fed9af5c

View File

@ -46,12 +46,12 @@ export class RssConfigComponent implements ModalComponent<ConfigModalContext> {
let feedCopy = JSON.parse(JSON.stringify(this.integration.feeds));
const idx = feedCopy.indexOf(feedUrl);
feedCopy.splice(idx, 1);
this.updateFeeds(feedCopy);
this.updateFeeds(feedCopy).then(() => this.feedUrl = "");
}
private updateFeeds(newFeeds) {
this.isUpdating = true;
this.api.updateIntegrationState(this.roomId, this.integration.type, this.integration.integrationType, this.scalarToken, {
return this.api.updateIntegrationState(this.roomId, this.integration.type, this.integration.integrationType, this.scalarToken, {
feeds: newFeeds
}).then(response => {
this.integration.feeds = response.feeds;