mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 02:41:56 +08:00
Fix notify for all posts switch field loading state (#3938)
This commit is contained in:
parent
e3350543af
commit
1aa7806244
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user