SettingsSearchProvider

The searchable rows one settings page contributes. Each page's module binds one in Koin, and the settings list collects them all with getAll, so the list depends on none of the pages. settingsSearchProvider builds one with the page's section and destination given once.

Bind each with a name of its own, single<SettingsSearchProvider>(named("reader")) { ... }: Koin keeps only the last of two bindings with the same name, or with none. Binding the name of a Toolkit page's provider (display, theme, privacy, about, advanced) replaces its rows.

entries receives the app's declared shell as a SettingsSearchContext, so a page lists the rows it shows in this app, under the same conditions as the page: a bottom bar's options only where the app uses bottom navigation. Rows whose destination the graph does not register are left out of the results.

Functions

Link copied to clipboard
Link copied to clipboard

The destinations of this provider's rows in context that its graph does not register. The search leaves such rows out; a test asserts this is empty to catch a page missing from the graph.