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

Unverified Commit 3ffd42b6 authored by Simon Chan's avatar Simon Chan
Browse files

fix(adb): prevent connection stall when cancel a socket

refs #419
parent 76fd15c4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,6 +44,6 @@
        "eslint": "8.8.0",
        "eslint-config-next": "12.1.6",
        "source-map-loader": "^3.0.1",
        "typescript": "4.7.1-rc"
        "typescript": "4.7.2"
    }
}
+2 −2
Original line number Diff line number Diff line
import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
import { ComponentType, CSSProperties, useEffect, useLayoutEffect, useMemo, useState } from "react";
import { ComponentType, CSSProperties, useEffect, useMemo, useState } from "react";
import { useStableCallback, withDisplayName } from "../utils";
import { ResizeObserver, Size } from './resize-observer';

@@ -184,7 +184,7 @@ export const Grid = withDisplayName('Grid')(({
        }
    });

    useLayoutEffect(() => {
    useEffect(() => {
        if (bodyRef) {
            setScrollLeft(bodyRef.scrollLeft);
            setScrollTop(bodyRef.scrollTop);
+1 −1
Original line number Diff line number Diff line
import { makeStyles } from "@griffel/react";
import { useEffect, useLayoutEffect, useState } from 'react';
import { useEffect, useState } from 'react';
import { useStableCallback, withDisplayName } from '../utils';

export interface Size {
+4 −0
Original line number Diff line number Diff line
@@ -66,6 +66,10 @@ const state = makeAutoObservable({
            return;
        }

        // Logcat always starts from beginning,
        // so don't append.
        this.list = [];

        this.running = true;
        this.stream = this.logcat!.binary();
        this.stopSignal = new AbortController();
+5 −1
Original line number Diff line number Diff line
@@ -25,11 +25,15 @@ interface Column extends GridColumn {
const LINE_HEIGHT = 32;

const state = new class {
    get empty() {
        return !GlobalState.logs.length;
    }

    get commandBarItems(): ICommandBarItemProps[] {
        return [
            {
                key: 'clear',
                disabled: !GlobalState.device,
                disabled: this.empty,
                iconProps: { iconName: Icons.Delete },
                text: 'Clear',
                onClick: () => GlobalState.clearLog(),
Loading