Skip to content

Commit f236c50

Browse files
authored
Removed code from separate pull request
1 parent ff6da0d commit f236c50

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

archinstall/tui/menu_item.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -226,20 +226,14 @@ def _default_suffix(self, item: MenuItem) -> str:
226226
def set_action_for_all(self, action: Callable[[Any], Any]) -> None:
227227
for item in self.items:
228228
item.action = action
229-
229+
230230
@cached_property
231231
def items(self) -> list[MenuItem]:
232232
pattern = self._filter_pattern.lower()
233233
items = filter(lambda item: item.is_empty() or pattern in item.text.lower(), self._menu_items)
234-
l_items = sorted(items, key=self._items_score)
234+
l_items = list(items)
235235
return l_items
236236

237-
def _items_score(self, item: MenuItem) -> int:
238-
pattern = self._filter_pattern.lower()
239-
if item.text.lower().startswith(pattern):
240-
return 0
241-
return 1
242-
243237
@property
244238
def filter_pattern(self) -> str:
245239
return self._filter_pattern

0 commit comments

Comments
 (0)