mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Fix notify for all posts switch field loading state (#3938)
This commit is contained in:
@@ -29,8 +29,14 @@ export default function () {
|
|||||||
id="flarum_subscriptions__notify_for_all_posts"
|
id="flarum_subscriptions__notify_for_all_posts"
|
||||||
state={!!this.user!.preferences()?.['flarum-subscriptions.notify_for_all_posts']}
|
state={!!this.user!.preferences()?.['flarum-subscriptions.notify_for_all_posts']}
|
||||||
onchange={(val: boolean) => {
|
onchange={(val: boolean) => {
|
||||||
this.user!.savePreferences({ 'flarum-subscriptions.notify_for_all_posts': val });
|
this.notifyForAllPostsLoading = true;
|
||||||
|
|
||||||
|
this.user!.savePreferences({ 'flarum-subscriptions.notify_for_all_posts': val }).then(() => {
|
||||||
|
this.notifyForAllPostsLoading = false;
|
||||||
|
m.redraw();
|
||||||
|
});
|
||||||
}}
|
}}
|
||||||
|
loading={this.notifyForAllPostsLoading}
|
||||||
>
|
>
|
||||||
{app.translator.trans('flarum-subscriptions.forum.settings.notify_for_all_posts_label')}
|
{app.translator.trans('flarum-subscriptions.forum.settings.notify_for_all_posts_label')}
|
||||||
</Switch>
|
</Switch>
|
||||||
|
Reference in New Issue
Block a user