Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
feat(ui): ✨ add search result check
Browse files Browse the repository at this point in the history
  • Loading branch information
AnzhiZhang committed Jun 16, 2022
1 parent a6b2685 commit 1b67e4f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion utils/window/frames/show.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from threading import Thread
from tkinter import Frame, Listbox, Scrollbar
from tkinter.messagebox import showwarning
from typing import TYPE_CHECKING, List, Dict

from utils.constant import SEARCH
Expand Down Expand Up @@ -60,8 +61,13 @@ def run():
else:
self.__search_index += 1

# Request and check result
result = request(self.__search_index)
if len(result) == 0:
showwarning('提示', '共搜索到 0 个结果!')

# Add request results
for i in request(self.__search_index):
for i in result:
self.__data.append(i)
self.__list_listbox.insert('end', i['name'].strip())

Expand Down

0 comments on commit 1b67e4f

Please sign in to comment.