mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +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"
|
||||
state={!!this.user!.preferences()?.['flarum-subscriptions.notify_for_all_posts']}
|
||||
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')}
|
||||
</Switch>
|
||||
|
Reference in New Issue
Block a user