optimization and wait for all commits to load before hiding loading indicator
This commit is contained in:
@@ -97,8 +97,6 @@ class RepoViewScreen(Screen):
|
||||
self.app.GITEA_HOST + f"api/v1/repos/{self.owner_name}/{self.repo_name}/contents"
|
||||
)
|
||||
|
||||
loading.display = False
|
||||
|
||||
if not files_response.ok:
|
||||
self.notify(files_response.text, title="Failed to get files:", severity="error")
|
||||
return
|
||||
@@ -133,7 +131,7 @@ class RepoViewScreen(Screen):
|
||||
commits = requests.get(
|
||||
self.app.GITEA_HOST + f"api/v1/repos/{self.owner_name}/{self.repo_name}/commits",
|
||||
params={
|
||||
#"path": ".",
|
||||
"path": ".",
|
||||
"verification": False,
|
||||
"files": False,
|
||||
"page": commit_page_number,
|
||||
@@ -161,6 +159,7 @@ class RepoViewScreen(Screen):
|
||||
))
|
||||
files.add_rows(rows)
|
||||
|
||||
loading.display = False
|
||||
files.display = True
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
|
||||
Reference in New Issue
Block a user