Make createScroller honor reverse param
This commit is contained in:
@@ -140,7 +140,7 @@
|
|||||||
data-tip={tooltip}
|
data-tip={tooltip}
|
||||||
class={cx(
|
class={cx(
|
||||||
reactionClass,
|
reactionClass,
|
||||||
"flex-inline btn btn-outline btn-neutral btn-xs flex items-center gap-1 rounded-full text-xs font-normal",
|
"flex-inline btn btn-outline btn-neutral btn-xs flex items-center gap-1 rounded-full text-xs font-normal bg-alt",
|
||||||
{
|
{
|
||||||
tooltip: !noTooltip && !isMobile,
|
tooltip: !noTooltip && !isMobile,
|
||||||
"border-neutral-content/20": !isOwn,
|
"border-neutral-content/20": !isOwn,
|
||||||
@@ -162,7 +162,7 @@
|
|||||||
data-tip={tooltip}
|
data-tip={tooltip}
|
||||||
class={cx(
|
class={cx(
|
||||||
reactionClass,
|
reactionClass,
|
||||||
"flex-inline btn btn-outline btn-neutral btn-xs gap-1 rounded-full font-normal",
|
"flex-inline btn btn-outline btn-neutral btn-xs gap-1 rounded-full font-normal bg-alt",
|
||||||
{
|
{
|
||||||
tooltip: !noTooltip && !isMobile,
|
tooltip: !noTooltip && !isMobile,
|
||||||
"border-neutral-content/20": !isOwn,
|
"border-neutral-content/20": !isOwn,
|
||||||
|
|||||||
+5
-2
@@ -47,9 +47,12 @@ export const createScroller = ({
|
|||||||
if (container) {
|
if (container) {
|
||||||
// While we have empty space, fill it
|
// While we have empty space, fill it
|
||||||
const {scrollY, innerHeight} = window
|
const {scrollY, innerHeight} = window
|
||||||
const {scrollHeight, scrollTop} = container
|
const {scrollHeight, scrollTop, clientHeight} = container
|
||||||
|
const viewHeight = clientHeight || innerHeight
|
||||||
const offset = Math.abs(scrollTop || scrollY)
|
const offset = Math.abs(scrollTop || scrollY)
|
||||||
const shouldLoad = offset + innerHeight + threshold > scrollHeight
|
const shouldLoad = reverse
|
||||||
|
? offset < threshold
|
||||||
|
: offset + viewHeight + threshold > scrollHeight
|
||||||
|
|
||||||
// Only trigger loading the first time we reach the threshold
|
// Only trigger loading the first time we reach the threshold
|
||||||
if (shouldLoad) {
|
if (shouldLoad) {
|
||||||
|
|||||||
@@ -46,13 +46,11 @@
|
|||||||
<Icon icon={Bell} /> Alerts
|
<Icon icon={Bell} /> Alerts
|
||||||
</SecondaryNavItem>
|
</SecondaryNavItem>
|
||||||
</div>
|
</div>
|
||||||
{#if Capacitor.getPlatform() !== "ios"}
|
<div in:fly|local={{delay: 100}} class:hidden={Capacitor.getPlatform() === "ios"}>
|
||||||
<div in:fly|local={{delay: 100}}>
|
<SecondaryNavItem href="/settings/wallet">
|
||||||
<SecondaryNavItem href="/settings/wallet">
|
<Icon icon={Wallet} /> Wallet
|
||||||
<Icon icon={Wallet} /> Wallet
|
</SecondaryNavItem>
|
||||||
</SecondaryNavItem>
|
</div>
|
||||||
</div>
|
|
||||||
{/if}
|
|
||||||
<div in:fly|local={{delay: 150}}>
|
<div in:fly|local={{delay: 150}}>
|
||||||
<SecondaryNavItem href="/settings/relays">
|
<SecondaryNavItem href="/settings/relays">
|
||||||
<Icon icon={Server} /> Relays
|
<Icon icon={Server} /> Relays
|
||||||
|
|||||||
Reference in New Issue
Block a user