fixed a crash and updated banner

This commit is contained in:
2026-02-05 16:46:11 +11:00
parent 162caa98b3
commit 82d7ff34ee
3 changed files with 39 additions and 20 deletions

View File

@@ -1,9 +1,10 @@
from widgets import Navbar
from textual.screen import Screen
from textual.widgets import Input, Select, LoadingIndicator, Static
from textual.containers import HorizontalGroup, ScrollableContainer
from textual.app import ComposeResult
from textual import work
from widgets import Navbar
from screens.repo_view_screen import RepoViewScreen
from human_readable import time_delta
@@ -66,7 +67,8 @@ class SearchScreen(Screen):
def action_view_repo(self, author: str, repo_name: str):
self.app.switch_screen(RepoViewScreen(author, repo_name))
def action_search_query(self):
@work(exclusive=True)
async def action_search_query(self):
query_input = self.query_one("#query")
loading = self.query_one(LoadingIndicator)
results = self.query_one(ScrollableContainer)
@@ -92,7 +94,6 @@ class SearchScreen(Screen):
# display results
results.remove_children(SearchResult)
to_mount = []
print(response.json())
for result in response.json()["data"]:
to_mount.append(SearchResult(result))
results.mount_all(to_mount)