mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
Prevent empty change events being fired on actions that just delegate to sources
This commit is contained in:
parent
e5a8ebd623
commit
f4eef6b7c8
@ -27,6 +27,9 @@ class EditionStore {
|
||||
onFetchEdition(editionId) {
|
||||
this.getInstance().lookupEdition(editionId);
|
||||
|
||||
// Prevent alt from sending an empty change event when a request is sent
|
||||
// off to the source
|
||||
this.preventDefault();
|
||||
}
|
||||
|
||||
onSuccessFetchEdition({ edition }) {
|
||||
|
@ -22,6 +22,10 @@ class UserStore {
|
||||
if (invalidateCache || !this.getInstance().isLoading()) {
|
||||
this.getInstance().lookupCurrentUser(invalidateCache);
|
||||
}
|
||||
|
||||
// Prevent alt from sending an empty change event when a request is sent
|
||||
// off to the source
|
||||
this.preventDefault();
|
||||
}
|
||||
|
||||
onSuccessFetchCurrentUser({ users: [ user = {} ] }) {
|
||||
@ -31,6 +35,10 @@ class UserStore {
|
||||
|
||||
onLogoutCurrentUser() {
|
||||
this.getInstance().performLogoutCurrentUser();
|
||||
|
||||
// Prevent alt from sending an empty change event when a request is sent
|
||||
// off to the source
|
||||
this.preventDefault();
|
||||
}
|
||||
|
||||
onSuccessLogoutCurrentUser() {
|
||||
|
@ -25,6 +25,10 @@ class WebhookStore {
|
||||
if (invalidateCache || !this.getInstance().isLoading()) {
|
||||
this.getInstance().lookupWebhooks(invalidateCache);
|
||||
}
|
||||
|
||||
// Prevent alt from sending an empty change event when a request is sent
|
||||
// off to the source
|
||||
this.preventDefault();
|
||||
}
|
||||
|
||||
onSuccessFetchWebhooks({ webhooks = [] }) {
|
||||
@ -38,6 +42,10 @@ class WebhookStore {
|
||||
if (invalidateCache || !this.getInstance().isLoading()) {
|
||||
this.getInstance().lookupWebhookEvents(invalidateCache);
|
||||
}
|
||||
|
||||
// Prevent alt from sending an empty change event when a request is sent
|
||||
// off to the source
|
||||
this.preventDefault();
|
||||
}
|
||||
|
||||
onSuccessFetchWebhookEvents({ events }) {
|
||||
@ -58,6 +66,9 @@ class WebhookStore {
|
||||
onRemoveWebhook(webhookId) {
|
||||
this.getInstance().performRemoveWebhook(webhookId);
|
||||
|
||||
// Prevent alt from sending an empty change event when a request is sent
|
||||
// off to the source
|
||||
this.preventDefault();
|
||||
}
|
||||
|
||||
onSuccessRemoveWebhook() {
|
||||
|
@ -22,6 +22,10 @@ class WhitelabelStore {
|
||||
if (invalidateCache || !this.getInstance().isLoading()) {
|
||||
this.getInstance().lookupWhitelabel(invalidateCache);
|
||||
}
|
||||
|
||||
// Prevent alt from sending an empty change event when a request is sent
|
||||
// off to the source
|
||||
this.preventDefault();
|
||||
}
|
||||
|
||||
onSuccessFetchWhitelabel({ whitelabel = {} }) {
|
||||
|
Loading…
Reference in New Issue
Block a user