fix: Fix typo in permission filter comparison (change == to !=)

Bugs (fixed):
  * The orderbook and ladder blink/flicker when orders change if logged
    in as non-bts user.

    Cause: The permission filter acted as if the predicate itself
    changed everytime an order changed. As a result, it would fire one
    update to cleared all values, then fire another to add items that
    pass the "new" predicate.
This commit is contained in:
John Colvin committed 2025-03-13 10:39:33 -04:00
1 parent 1ff72e9444
commit a2b79e5674
1 file changed
+1 -1
@@ -322,7 +322,7 @@ namespace bts.api.core {
Log.DataFlow.diag($"Create Filter {typeof(T).Name}");
return source.CombineLatest(predicate, (upd, pred) => (upd, pred)).Subscribe(tup => {
bool pred_changed = tup.pred == pred_cache && pred_cache is not null;
bool pred_changed = tup.pred != pred_cache && pred_cache is not null;
pred_cache = tup.pred;
unfiltered_cache = tup.upd;
if (pred_changed && filtered_cache is not null) {