diff --git a/src/stores/settings/appearance.js b/src/stores/settings/appearance.js index c0f93e13..152e985f 100644 --- a/src/stores/settings/appearance.js +++ b/src/stores/settings/appearance.js @@ -363,10 +363,19 @@ export const useAppearanceSettingsStore = defineStore( updateTrustColorClasses(trustColor.value); } - async function userColourInit() { - let dictObject = await AppApi.GetColourBulk( - Array.from(userStore.cachedUsers.keys()) - ); + async function userColourInit(customFunc) { + let dictObject = null; + if (typeof customFunc === 'function') { + dictObject = customFunc(userStore.cachedUsers.keys()); + } else { + dictObject = await AppApi.GetColourBulk( + Array.from(userStore.cachedUsers.keys()) + ); + } + if (!dictObject) { + console.warn('No user colour data found'); + return; + } if (LINUX) { // @ts-ignore dictObject = Object.fromEntries(dictObject);