Skip to content

Commit

Permalink
refactor: rename SearchController internal state
Browse files Browse the repository at this point in the history
Co-authored-by: Anton Arnautov <43254280+arnautov-anton@users.noreply.github.com>
  • Loading branch information
MartinCupela and arnautov-anton committed Jan 31, 2025
1 parent e145dae commit 84fac12
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/search_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,11 @@ export type SearchControllerOptions = {
};

export class SearchController<StreamChatGenerics extends ExtendableGenerics = DefaultGenerics> {
// Keeps data that is subject to change. Not intended for direct use by integrators.
internalState: StateStore<InternalSearchControllerState<StreamChatGenerics>>;
/**
* Not intended for direct use by integrators, might be removed without notice resulting in
* broken integrations.
*/
_internalState: StateStore<InternalSearchControllerState<StreamChatGenerics>>;
state: StateStore<SearchControllerState>;
config: SearchControllerConfig;

Expand All @@ -378,7 +381,7 @@ export class SearchController<StreamChatGenerics extends ExtendableGenerics = De
searchQuery: '',
sources: sources ?? [],
});
this.internalState = new StateStore<InternalSearchControllerState<StreamChatGenerics>>({});
this._internalState = new StateStore<InternalSearchControllerState<StreamChatGenerics>>({});
this.config = { keepSingleActiveSource: true, ...config };
}
get hasNext() {
Expand Down

0 comments on commit 84fac12

Please # to comment.