Skip to content

Commit

Permalink
use canTransition
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Oct 18, 2023
1 parent 1cf1b5b commit 4a39da7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions web/src/routes/TimelineView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
export let showLoading = true;
export let createdAtFormat: 'auto' | 'time' = 'auto';
export let full = false;
export let transitional = true;
export let canTransition = true;
let loading = false;
let innerHeight: number;
Expand Down Expand Up @@ -78,7 +78,7 @@
target = target.parentElement;
}
}
if (transitional) {
if (canTransition) {
if (nostrEvent.kind === 42 && $channelIdStore === undefined) {
const channelId = findChannelId(nostrEvent.tags);
if (channelId !== undefined) {
Expand All @@ -101,7 +101,7 @@
{#each items as item (item.event.id)}
{#if !isMuteEvent(item.event)}
<li
class={transitional ? 'transitional-post' : ''}
class={canTransition ? 'canTransition-post' : ''}
class:related={$author?.isNotified(item.event)}
on:mouseup={(e) => viewDetail(e, item.event)}
>
Expand Down Expand Up @@ -139,11 +139,11 @@
text-overflow: ellipsis;
}
.transitional-post {
.canTransition-post {
cursor: pointer;
}
.transitional-post:hover {
.canTransition-post:hover {
background: var(--accent-surface-low);
}
Expand All @@ -155,7 +155,7 @@
cursor: pointer;
}
:global(.transitional-post blockquote:hover) {
:global(.canTransition-post blockquote:hover) {
background: var(--accent-surface-high);
}
Expand Down
2 changes: 1 addition & 1 deletion web/src/routes/[slug=note]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
load={async () => console.debug()}
showLoading={false}
full={true}
transitional={false}
canTransition={false}
/>
</div>

Expand Down

0 comments on commit 4a39da7

Please sign in to comment.