mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
new usersetting to blacklist (filter) also on description
This commit is contained in:
@@ -337,6 +337,28 @@ export const useFredyState = create(
|
||||
throw Exception;
|
||||
}
|
||||
},
|
||||
async setBlacklistFilterOnProviderDetails(enabled) {
|
||||
try {
|
||||
await xhrPost('/api/user/settings/blacklist-filter-on-details', {
|
||||
blacklist_filter_on_provider_details: enabled,
|
||||
});
|
||||
set((state) => ({
|
||||
userSettings: {
|
||||
...state.userSettings,
|
||||
settings: {
|
||||
...state.userSettings.settings,
|
||||
blacklist_filter_on_provider_details: enabled,
|
||||
},
|
||||
},
|
||||
}));
|
||||
} catch (Exception) {
|
||||
console.error(
|
||||
'Error while trying to update blacklist-filter-on-provider-details setting. Error:',
|
||||
Exception,
|
||||
);
|
||||
throw Exception;
|
||||
}
|
||||
},
|
||||
async setListingsViewMode(listings_view_mode) {
|
||||
try {
|
||||
await xhrPost('/api/user/settings/listings-view-mode', { listings_view_mode });
|
||||
|
||||
Reference in New Issue
Block a user