From 130fdb459d811ed2a98f2343b338281d94a95cfa Mon Sep 17 00:00:00 2001 From: DogeisCut <23178844+DogeisCut@users.noreply.github.com> Date: Sun, 6 Apr 2025 22:36:17 -0600 Subject: [PATCH 1/2] Pass the id of the monitor as a argument for toMonitorContent i have no idea if this will work btw and also can we fix reporters and lists not updating when the monitor content is changed to a custom type --- src/lib/monitor-adapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/monitor-adapter.js b/src/lib/monitor-adapter.js index 1d6a1b1af8f..7609d8d534a 100644 --- a/src/lib/monitor-adapter.js +++ b/src/lib/monitor-adapter.js @@ -56,7 +56,7 @@ export default function ({id, spriteName, opcode, params, value, vm}) { if (typeof value === 'object' && typeof (value.toMonitorContent || value.toReporterContent) === 'function') { value = value.toMonitorContent - ? value.toMonitorContent() + ? value.toMonitorContent(id) : value.toReporterContent(); isHTML = true; } From 02dd75f6e35171f9e405e2ac98bc4d92eaee1c1b Mon Sep 17 00:00:00 2001 From: DogeisCut <23178844+DogeisCut@users.noreply.github.com> Date: Sun, 6 Apr 2025 22:39:11 -0600 Subject: [PATCH 2/2] Pass the index of the list item as an argument for toListItem() --- src/components/monitor/list-monitor-scroller.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/monitor/list-monitor-scroller.jsx b/src/components/monitor/list-monitor-scroller.jsx index f9e23074abe..a5b5544b769 100644 --- a/src/components/monitor/list-monitor-scroller.jsx +++ b/src/components/monitor/list-monitor-scroller.jsx @@ -34,7 +34,7 @@ class ListMonitorScroller extends React.Component { rowRenderer ({index, key, style}) { const item = this.props.values[index]; const renderedValue = item.toListItem - ? item.toListItem() + ? item.toListItem(index) : item.toMonitorContent ? item.toMonitorContent() : item.toReporterContent