So I found a working solution. There is apparently a private message version of the TopicTrackingState. Took me a while to figure out that it requires a “key” as a parameter, which is unclear to me what the key is for but it took an arbitrary string without issue
pmTopicTrackingState.onStateChange("pm-tracking-key", () => {
this.scheduleRerender();
});
This triggers the rerender but I noticed that new_personal_messages_notifications_count is not updated in time for the rerender so it fails to actually update immediately.
I think this is a “good enough” solution for me though. The notification eventually makes it’s way onto the widget. I’m happy to hear any comments on this though