Don't start with any member in autocompl. models
Fix the AutoCompletedMembers filter model to ensure that it doesn't pick all the items from the corresponding room member model on startup, wait until the user actually uses the completion feature to fill it.
This commit is contained in:
@@ -123,11 +123,17 @@ class FieldStringFilter(ModelFilter):
|
||||
all lowercase, sensitive otherwise.
|
||||
"""
|
||||
|
||||
def __init__(self, sync_id: SyncId, fields: Collection[str]) -> None:
|
||||
self.fields: Collection[str] = fields
|
||||
self._filter: str = ""
|
||||
def __init__(
|
||||
self,
|
||||
sync_id: SyncId,
|
||||
fields: Collection[str],
|
||||
no_filter_accept_all_items: bool = True,
|
||||
) -> None:
|
||||
|
||||
self.fields = fields
|
||||
self.no_filter_accept_all_items = no_filter_accept_all_items
|
||||
self._filter: str = ""
|
||||
|
||||
self.no_filter_accept_all_items: bool = True
|
||||
|
||||
super().__init__(sync_id)
|
||||
|
||||
|
@@ -125,8 +125,11 @@ class AutoCompletedMembers(FieldStringFilter):
|
||||
self.room_id = room_id
|
||||
sync_id = (user_id, room_id, "autocompleted_members")
|
||||
|
||||
super().__init__(sync_id=sync_id, fields=("display_name", "id"))
|
||||
self.no_filter_accept_all_items = False
|
||||
super().__init__(
|
||||
sync_id = sync_id,
|
||||
fields = ("display_name", "id"),
|
||||
no_filter_accept_all_items = False,
|
||||
)
|
||||
|
||||
|
||||
def accept_source(self, source: Model) -> bool:
|
||||
|
Reference in New Issue
Block a user