Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 704e70a5 authored by Simon Chan's avatar Simon Chan
Browse files

fix(demo): packet log shows incorrect arg1 value

parent 919baa79
Loading
Loading
Loading
Loading
+13 −10
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ export const Grid = withDisplayName('Grid')(({
    }, [bodyRef]);

    const rowRange = useMemo(() => {
        const start = Math.floor(scrollTop / rowHeight);
        const start = Math.min(rowCount, Math.floor(scrollTop / rowHeight));
        const end = Math.min(rowCount, Math.ceil((scrollTop + bodySize.height) / rowHeight));
        return { start, end, offset: scrollTop - start * rowHeight };
    }, [scrollTop, bodySize.height, rowCount, rowHeight]);
@@ -302,7 +302,9 @@ export const Grid = withDisplayName('Grid')(({
            <div ref={setBodyRef} className={classes.body} onScroll={handleScroll}>
                <ResizeObserver onResize={setBodySize} />
                {placeholder}
                {Array.from(Array(rowRange.end - rowRange.start), (_, rowIndex) => (
                {Array.from(
                    { length: rowRange.end - rowRange.start },
                    (_, rowIndex) => (
                        <GridRowWrapper
                            key={rowRange.start + rowIndex}
                            RowComponent={RowComponent}
@@ -310,7 +312,8 @@ export const Grid = withDisplayName('Grid')(({
                            rowHeight={rowHeight}
                            columns={columnMetadata.columns}
                        />
                ))}
                    )
                )}
            </div>
        </div>
    );
+1 −1
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ const columns: Column[] = [
            const item = globalState.logs[rowIndex];

            if (!item.arg1String) {
                item.arg1String = item.arg0.toString(16).padStart(8, '0');
                item.arg1String = item.arg1.toString(16).padStart(8, '0');
            }

            const classes = useClasses();