filtering by name added
This commit is contained in:
parent
26fcc260df
commit
b9937c13cd
2 changed files with 7 additions and 5 deletions
|
|
@ -174,8 +174,9 @@ class Profile(Contact):
|
|||
|
||||
def filtration(self, show_online=True, filter_str=''):
|
||||
# TODO: hide elements in list
|
||||
filter_str = filter_str.lower()
|
||||
for friend in self._friends:
|
||||
friend.visibility = (friend.status is not None or not show_online) and (filter_str in friend.name)
|
||||
friend.visibility = (friend.status is not None or not show_online) and (filter_str in friend.name.lower())
|
||||
self.show_online, self.filter_string = show_online, filter_str
|
||||
|
||||
def get_friend_by_number(self, num):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue