Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions src/search/SearchController.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { StateStore } from '@stream-io/state-store';
import type { Unsubscribe } from '@stream-io/state-store';
import type { MessageResponse } from '../types';
import type { StreamChat } from '../client';
import type { SearchSource } from './BaseSearchSource';
import { ConfigController } from '../configuration/ConfigController';
Expand All @@ -13,12 +12,6 @@ export type SearchControllerState = {
sources: SearchSource[];
};

export type InternalSearchControllerState = {
// FIXME: focusedMessage should live in a MessageListController class that does not exist yet.
// This state prop should be then removed
focusedMessage?: MessageResponse;
};

export type SearchControllerConfig = {
// The controller will make sure there is always exactly one active source. Enabled by default.
keepSingleActiveSource: boolean;
Expand All @@ -43,11 +36,6 @@ export const DEFAULT_SEARCH_CONTROLLER_CONFIG: SearchControllerConfig = deepFree
});

export class SearchController {
/**
* Not intended for direct use by integrators, might be removed without notice resulting in
* broken integrations.
*/
_internalState: StateStore<InternalSearchControllerState>;
state: StateStore<SearchControllerState>;

/** The shared configuration machinery — see {@link ConfigController}. */
Expand All @@ -69,7 +57,6 @@ export class SearchController {
searchQuery: '',
sources: sources ?? [],
});
this._internalState = new StateStore<InternalSearchControllerState>({});
this.configController = new ConfigController<SearchControllerConfig>({
defaults: DEFAULT_SEARCH_CONTROLLER_CONFIG,
constructorOptions: config,
Expand Down