Skip to content

Restore Combined Index View #31

@askvortsov1

Description

@askvortsov1

I was thinking back to the combined index view issue (reverted in 72d06ba), and I think there might be a solution: we could run it through visibility scoping. This was much more confusing before with events, but now, all we need is an EloquentBuilder instance for Flarum\Discussion\Discussion. Unfortunately the query available under $search->getQuery() is a QueryBuilder, but we can wrap it in an EloquentBuilder to get access: core does a similar thing in https://github.com/flarum/core/blob/master/src/Post/Access/ScopePostVisibility.php#L55.

It would probably be a fair bit slower since visibility scoping is applied twice, but it should make it possible to restore combined view functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions