Hey,
I might have figured this out. The problem (obviously) is that the ‘new’ topic flag does not get cleared when you actually visit a new topic. I believe this happens because the ‘clear new topic’ function is hooked up to the wrong action.
In bbpress-new-topics.php, I added the following code after line 51:
add_action( 'bbp_template_before_single_topic', array( $this, 'bbp_theme_before_topic_title' ) );
Full diff:
diff -Nur bbpress-new-topics-old/bbpress-new-topics.php bbpress-new-topics/bbpress-new-topics.php
--- bbpress-new-topics-old/bbpress-new-topics.php 2014-04-09 10:52:05.254186487 +0200
+++ bbpress-new-topics/bbpress-new-topics.php 2014-04-09 10:51:24.464813058 +0200
@@ -49,6 +49,11 @@
add_filter( 'bbp_get_topic_class', array( $this, 'bbp_get_topic_class' ), 10, 2 );
add_action( 'bbp_theme_before_topic_title', array( $this, 'bbp_theme_before_topic_title' ) );
+ /* bbp_theme_before_topic_title does not fire on topic view (anymore?)
+ But we need it to fire so we can set the topic to seen and clear
+ the new flag
+ */
+ add_action( 'bbp_template_before_single_topic', array( $this, 'bbp_theme_before_topic_title' ) );
}
public function admin_init() {