mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 05:05:53 +00:00
Clear feed url after adding successfully
This commit is contained in:
parent
58feb07119
commit
e6fed9af5c
@ -46,12 +46,12 @@ export class RssConfigComponent implements ModalComponent<ConfigModalContext> {
|
|||||||
let feedCopy = JSON.parse(JSON.stringify(this.integration.feeds));
|
let feedCopy = JSON.parse(JSON.stringify(this.integration.feeds));
|
||||||
const idx = feedCopy.indexOf(feedUrl);
|
const idx = feedCopy.indexOf(feedUrl);
|
||||||
feedCopy.splice(idx, 1);
|
feedCopy.splice(idx, 1);
|
||||||
this.updateFeeds(feedCopy);
|
this.updateFeeds(feedCopy).then(() => this.feedUrl = "");
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateFeeds(newFeeds) {
|
private updateFeeds(newFeeds) {
|
||||||
this.isUpdating = true;
|
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
|
feeds: newFeeds
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.integration.feeds = response.feeds;
|
this.integration.feeds = response.feeds;
|
||||||
|
Loading…
Reference in New Issue
Block a user