Skip to content

Commit

Permalink
fixed hunter search. fixed hiding hunter names bug
Browse files Browse the repository at this point in the history
  • Loading branch information
majikat768 committed Jan 27, 2024
1 parent e6feaa5 commit b42fd81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/Screens/Hunters/components/HunterSearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ def search(self,text):
if len(text) == 0:
return
res = execute_query("select h.profileid,h.blood_line_name from 'hunters' h where h.blood_line_name like '%%%s%%' group by h.blood_line_name limit 30" % text)
if len(res) > 0:
self.updateResults([{'id':r[0],'blood_line_name':r[1]} for r in res])
self.updateResults([{'id':r[0],'blood_line_name':r[1]} for r in res])

def updateResults(self,res):
self.clearResults()
print(res)
if len(res) == 0:
self.results.layout.addWidget(Label("No Results...."))
for r in res:
btn = QPushButton(r['blood_line_name'])
btn.id = r['id']
Expand Down
2 changes: 1 addition & 1 deletion src/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ def tab():


def hunter_name(name):
if settings.value("hide_hunter_names",False):
if settings.value("hide_hunter_names",'false') == 'true':
return "hunter%d" % (hash(name)%9999)
return name

0 comments on commit b42fd81

Please sign in to comment.