Skip to content

Commit

Permalink
Merge pull request #67 from Suwayomi/main
Browse files Browse the repository at this point in the history
queryParams replace history rather than push
  • Loading branch information
Robonau authored Nov 11, 2023
2 parents eb125b1 + 5c0f2e1 commit b233321
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/Search.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
let inputElement: HTMLInputElement;
// eslint-disable-next-line no-undef
let timeoutCancel: NodeJS.Timeout | undefined = undefined;
const query = queryParam('q', ssp.string());
const query = queryParam('q', ssp.string(), { pushHistory: false });
$: searchElementHidden = $query === null || $query === '';
$: value = $query || '';
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(app)/(library)/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
let lastselected: MangaType | undefined;
const query = queryParam('q', ssp.string());
const tab = queryParam('tab', ssp.number());
const query = queryParam('q', ssp.string(), { pushHistory: false });
const tab = queryParam('tab', ssp.number(), { pushHistory: false });
$: mangas = category({
variables: { id: $tab ?? 0 },
fetchPolicy: 'cache-first',
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/(library)/LibraryMassCategoryModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import { selected } from './LibraryStores';
import { queryParam, ssp } from 'sveltekit-search-params';
const tab = queryParam('tab', ssp.number());
const tab = queryParam('tab', ssp.number(), { pushHistory: false });
const modalStore = getModalStore();
const toastStore = getToastStore();
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/browse/extensions/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import { Meta } from '$lib/simpleStores';
let toastStore = getToastStore();
const query = queryParam('q', ssp.string());
const query = queryParam('q', ssp.string(), { pushHistory: false });
type Textension = ExtensionsQuery['extensions']['nodes'][0];
let extensions: Readable<
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/browse/globalSearch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
export let OpenModal: ((id: number) => void) | undefined = undefined;
const queue = new PQueue({ concurrency: 4 });
const query = queryParam('q', ssp.string());
const query = queryParam('q', ssp.string(), { pushHistory: false });
let rawSources = sources({ variables: { isNsfw: $Meta.nsfw ? null : false } });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
const modalStore = getModalStore();
const query = queryParam('q', ssp.string());
const query = queryParam('q', ssp.string(), { pushHistory: false });
const manga = getManga({ variables: { id: data.MangaID } });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$filtersSause = data.sourceID;
const sause = data.sause;
const query = queryParam('q', ssp.string());
const query = queryParam('q', ssp.string(), { pushHistory: false });
let queryfilter = {
query: $query === '' ? undefined : $query ?? undefined,
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/browse/sources/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
type Tsource = SourcesQuery['sources']['nodes'][0];
const sources = getsources({ variables: { isNsfw: $Meta.nsfw ? null : false } });
const query = queryParam('q', ssp.string());
const query = queryParam('q', ssp.string(), { pushHistory: false });
$: filteredSources = $sources.data?.sources?.nodes.filter((ele) => {
if (!$Sourcelangfilt.has(ele.lang)) return false;
Expand Down

0 comments on commit b233321

Please sign in to comment.