File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { get, writable } from 'svelte/store';
6
6
import { sdk } from './sdk' ;
7
7
import type { Models } from '@appwrite.io/console' ;
8
8
import { organization } from './organization' ;
9
+ import { user } from '$lib/stores/user' ;
9
10
10
11
type Preferences = {
11
12
limit ?: number ;
@@ -30,7 +31,7 @@ type PreferencesStore = {
30
31
} & { hideAiDisclaimer ?: boolean } ;
31
32
32
33
async function updateConsolePreferences ( store : PreferencesStore ) : Promise < void > {
33
- const currentPreferences = await sdk . forConsole . account . getPrefs ( ) ;
34
+ const currentPreferences = get ( user ) . prefs ?? ( await sdk . forConsole . account . getPrefs ( ) ) ;
34
35
if ( ! currentPreferences ?. console || Array . isArray ( currentPreferences . console ) ) {
35
36
currentPreferences . console = { } ;
36
37
}
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import type { NotificationPrefItem } from '$lib/helpers/notifications';
7
7
export type Account = Models . User <
8
8
{
9
9
organization ?: string ;
10
+ console : Record < string , Models . Preferences > ;
10
11
notificationPrefs : Record < string , NotificationPrefItem > ;
11
12
} & Record < string , string >
12
13
> ;
You can’t perform that action at this time.
0 commit comments