Remove unused field from Logs plugin state
Summary: Didn't understand what that field meant. Turns out, it was never used. Reviewed By: nikoant Differential Revision: D22374893 fbshipit-source-id: c36d8f0c1be1b27306347d1c8c8a763c621720a5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a286ef5c62
commit
006bf5357f
@@ -51,7 +51,6 @@ type Entries = ReadonlyArray<{
|
|||||||
type BaseState = {
|
type BaseState = {
|
||||||
readonly rows: ReadonlyArray<TableBodyRow>;
|
readonly rows: ReadonlyArray<TableBodyRow>;
|
||||||
readonly entries: Entries;
|
readonly entries: Entries;
|
||||||
readonly key2entry: {readonly [key: string]: DeviceLogEntry};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type AdditionalState = {
|
type AdditionalState = {
|
||||||
@@ -263,18 +262,15 @@ export function addEntriesToState(
|
|||||||
state: BaseState = {
|
state: BaseState = {
|
||||||
rows: [],
|
rows: [],
|
||||||
entries: [],
|
entries: [],
|
||||||
key2entry: {},
|
|
||||||
} as const,
|
} as const,
|
||||||
addDirection: 'up' | 'down' = 'up',
|
addDirection: 'up' | 'down' = 'up',
|
||||||
): BaseState {
|
): BaseState {
|
||||||
const rows = [...state.rows];
|
const rows = [...state.rows];
|
||||||
const entries = [...state.entries];
|
const entries = [...state.entries];
|
||||||
const key2entry = {...state.key2entry};
|
|
||||||
|
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
const {entry, row} = items[i];
|
const {entry, row} = items[i];
|
||||||
entries.push({row, entry});
|
entries.push({row, entry});
|
||||||
key2entry[row.key] = entry;
|
|
||||||
|
|
||||||
let previousEntry: DeviceLogEntry | null = null;
|
let previousEntry: DeviceLogEntry | null = null;
|
||||||
|
|
||||||
@@ -290,7 +286,6 @@ export function addEntriesToState(
|
|||||||
return {
|
return {
|
||||||
entries,
|
entries,
|
||||||
rows,
|
rows,
|
||||||
key2entry,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -579,7 +574,6 @@ export default class LogTable extends FlipperDevicePlugin<
|
|||||||
entries: [],
|
entries: [],
|
||||||
rows: [],
|
rows: [],
|
||||||
highlightedRows: new Set(),
|
highlightedRows: new Set(),
|
||||||
key2entry: {},
|
|
||||||
counters: this.state.counters.map((counter) => ({
|
counters: this.state.counters.map((counter) => ({
|
||||||
...counter,
|
...counter,
|
||||||
count: 0,
|
count: 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user