Add a way to toggle ScrollPanel
and TimelinePanel
debug logs (#8513)
Part of https://github.com/vector-im/element-web/issues/21532 To better debug timeline issues when they crop up. Turn on: ```js mxSettingsStore.setValue('debug_scroll_panel', null, 'device', true); mxSettingsStore.setValue('debug_timeline_panel', null, 'device', true); ``` Turn off: ```js mxSettingsStore.setValue('debug_scroll_panel', null, 'device', false); mxSettingsStore.setValue('debug_timeline_panel', null, 'device', false); ```
This commit is contained in:
parent
e97536ef96
commit
46ba14219c
3 changed files with 19 additions and 16 deletions
|
@ -61,13 +61,11 @@ const READ_RECEIPT_INTERVAL_MS = 500;
|
|||
|
||||
const READ_MARKER_DEBOUNCE_MS = 100;
|
||||
|
||||
const DEBUG = false;
|
||||
|
||||
let debuglog = function(...s: any[]) {};
|
||||
if (DEBUG) {
|
||||
// using bind means that we get to keep useful line numbers in the console
|
||||
debuglog = logger.log.bind(console, "TimelinePanel debuglog:");
|
||||
}
|
||||
const debuglog = (...args: any[]) => {
|
||||
if (SettingsStore.getValue("debug_timeline_panel")) {
|
||||
logger.log.call(console, "TimelinePanel debuglog:", ...args);
|
||||
}
|
||||
};
|
||||
|
||||
interface IProps {
|
||||
// The js-sdk EventTimelineSet object for the timeline sequence we are
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue