Skip to content

Commit

Permalink
Prevented cycle in changes navigation.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Dec 20, 2024
1 parent bc29ce2 commit 705f225
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Dates should be in`YYYY-MM-DD` format and versions are in [semantic versioning](

## v0.7.5 2024-12-19

### Fixed

- Prevented cycle in changes navigation.

### Maintenance

- Updated minor point releases.
Expand Down
13 changes: 8 additions & 5 deletions src/lib/Changes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,14 @@
// When the filters change, update the URL to match
$effect(() => {
const params = new URLSearchParams($page.url.searchParams.toString());
const start = params.toString();
if (filterText === '') params.delete('words');
else params.set('words', encodeURI(filterText));
if (filterStatus === undefined) params.delete('status');
else params.set('status', filterStatus);
goto(`?${params.toString()}`, { replaceState: true, keepFocus: true });
// Did the params change? Navigate.
if (start !== params.toString())
goto(`?${params.toString()}`, { replaceState: true, keepFocus: true });
});
// The filtered list of comment IDs that we need to asynchronously load.
Expand Down Expand Up @@ -145,10 +148,10 @@
<td class="info">
<ChangeLink id={change.id} />
<div class="update">
{#if comment}<Button
tip="Add comment to change"
action={() => (submittingComment = change)}>+</Button
><em>{org.getProfileWithPersonID(comment.who)?.name}</em>
<Button tip="Add comment to change" action={() => (submittingComment = change)}
>+</Button
>
{#if comment}<em>{org.getProfileWithPersonID(comment.who)?.name}</em>
<TimeView time={false} date={timestampToDate(comment.when)} />
<MarkupView
small
Expand Down

0 comments on commit 705f225

Please sign in to comment.