Skip to content

Commit

Permalink
use local NVP for dismissing save search tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
lakchote committed Sep 23, 2024
1 parent e5bee24 commit 0f3b308
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/libs/actions/Search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type {ValueOf} from 'type-fest';
import type {FormOnyxValues} from '@components/Form/types';
import type {SearchQueryJSON} from '@components/Search/types';
import * as API from '@libs/API';
import type {ExportSearchItemsToCSVParams, SetNameValuePairParams} from '@libs/API/parameters';
import type {ExportSearchItemsToCSVParams} from '@libs/API/parameters';
import {READ_COMMANDS, WRITE_COMMANDS} from '@libs/API/types';
import * as ApiUtils from '@libs/ApiUtils';
import fileDownload from '@libs/fileDownload';
Expand Down Expand Up @@ -161,22 +161,7 @@ function setShouldShowSavedSearchRenameTooltip() {
}

function dismissSavedSearchRenameTooltip() {
const parameters: SetNameValuePairParams = {
name: ONYXKEYS.SHOULD_SHOW_SAVED_SEARCH_RENAME_TOOLTIP,
value: false,
};

const optimisticData: OnyxUpdate[] = [
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.SHOULD_SHOW_SAVED_SEARCH_RENAME_TOOLTIP,
value: false,
},
];

API.write(WRITE_COMMANDS.SET_NAME_VALUE_PAIR, parameters, {
optimisticData,
});
Onyx.set(ONYXKEYS.SHOULD_SHOW_SAVED_SEARCH_RENAME_TOOLTIP, false);
}

export {
Expand Down

0 comments on commit 0f3b308

Please sign in to comment.