Skip to content

Commit 14ccda9

Browse files
committed
Have some padding bottom for chatlists
1 parent eaf31b9 commit 14ccda9

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

‎src/components/deferredSortedVirtualList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ export const createDeferredSortedVirtualList = <T, >(args: CreateDeferredSortedV
235235
}}
236236
scrollableHost={scrollable}
237237
thresholdPadding={72 * 4}
238+
extraPaddingBottom={8} // 0.5rem
238239
/>;
239240

240241
return {

‎src/components/verticalVirtualList.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const VerticalVirtualList: Component<{
2424
thresholdPadding: number;
2525

2626
forceHostHeight?: boolean;
27+
extraPaddingBottom?: number;
2728
}> = (props) => {
2829
const totalCount = createMemo(() => props.list.length);
2930

@@ -82,7 +83,9 @@ const VerticalVirtualList: Component<{
8283
);
8384
};
8485

85-
const height = createMemo(() => props.forceHostHeight ? hostSize.height : totalCount() * props.itemHeight);
86+
const computedItemsHeight = () => totalCount() * props.itemHeight + Number(!!totalCount()) * (props.extraPaddingBottom || 0);
87+
88+
const height = createMemo(() => props.forceHostHeight ? hostSize.height : computedItemsHeight());
8689

8790
return (
8891
<ul

‎src/scss/partials/_chatlist.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ ul.chatlist {
430430
&.with-contacts {
431431
.chatlist-top:not(.with-placeholder) {
432432
height: auto;
433-
padding-bottom: .5rem;
433+
// padding-bottom: .5rem;
434434
}
435435

436436
.chatlist-top.with-placeholder {

0 commit comments

Comments
 (0)