Removed and improved some logging messages
parent
13e0d91ee8
commit
3b60d45ff1
|
@ -10,6 +10,7 @@ import ResizeObserver from 'resize-observer-polyfill';
|
||||||
import {RDPChannelTree, RDPEntry} from "./RendererDataProvider";
|
import {RDPChannelTree, RDPEntry} from "./RendererDataProvider";
|
||||||
import {ClientIconRenderer} from "tc-shared/ui/react-elements/Icons";
|
import {ClientIconRenderer} from "tc-shared/ui/react-elements/Icons";
|
||||||
import {ClientIcon} from "svg-sprites/client-icons";
|
import {ClientIcon} from "svg-sprites/client-icons";
|
||||||
|
import {LogCategory, logWarn} from "tc-shared/log";
|
||||||
|
|
||||||
const viewStyle = require("./View.scss");
|
const viewStyle = require("./View.scss");
|
||||||
|
|
||||||
|
@ -191,8 +192,10 @@ export class ChannelTreeView extends ReactComponentBase<ChannelTreeViewPropertie
|
||||||
scrollEntryInView(entryId: number, callback?: () => void) {
|
scrollEntryInView(entryId: number, callback?: () => void) {
|
||||||
const index = this.state.tree.findIndex(e => e.entryId === entryId);
|
const index = this.state.tree.findIndex(e => e.entryId === entryId);
|
||||||
if (index === -1) {
|
if (index === -1) {
|
||||||
if (callback) callback();
|
if (callback) {
|
||||||
console.warn(tr("Failed to scroll tree entry in view because its not registered within the view. EntryId: %d"), entryId);
|
callback();
|
||||||
|
}
|
||||||
|
logWarn(LogCategory.GENERAL, tr("Failed to scroll tree entry in view because its not registered within the view. EntryId: %d"), entryId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +206,9 @@ export class ChannelTreeView extends ReactComponentBase<ChannelTreeViewPropertie
|
||||||
} else if (index < currentRange.begin) {
|
} else if (index < currentRange.begin) {
|
||||||
newIndex = index;
|
newIndex = index;
|
||||||
} else {
|
} else {
|
||||||
if (callback) callback();
|
if (callback) {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue