Skip to content

Commit 574cfef

Browse files
authored
Update view_home.go
1 parent c0d9408 commit 574cfef

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

routers/web/repo/view_home.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ func prepareRecentlyPushedNewBranches(ctx *context.Context) {
224224
}
225225

226226
func updateContextRepoEmptyAndStatus(ctx *context.Context, empty bool, status repo_model.RepositoryStatus) {
227+
if ctx.Repo.Repository.IsEmpty == empty && ctx.Repo.Repository.Status == status {
228+
return
229+
}
227230
ctx.Repo.Repository.IsEmpty = empty
228231
if ctx.Repo.Repository.Status == repo_model.RepositoryReady || ctx.Repo.Repository.Status == repo_model.RepositoryBroken {
229232
ctx.Repo.Repository.Status = status // only handle ready and broken status, leave other status as-is

0 commit comments

Comments
 (0)