From 68948baff37e139a2a3f88ce3b233effb55955c4 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Mon, 18 Nov 2024 15:59:40 +0100 Subject: feat: Add repo debug information --- src/main/kotlin/repo/RepoManager.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/main/kotlin/repo/RepoManager.kt') diff --git a/src/main/kotlin/repo/RepoManager.kt b/src/main/kotlin/repo/RepoManager.kt index dc39511..667ab73 100644 --- a/src/main/kotlin/repo/RepoManager.kt +++ b/src/main/kotlin/repo/RepoManager.kt @@ -118,12 +118,20 @@ object RepoManager { } fun reload() { + if (!TestUtil.isInTest && !MC.instance.isOnThread) { + MC.instance.send { + reload() + } + return + } try { ItemCache.ReloadProgressHud.reportProgress("Reloading from Disk", 0, -1) // TODO: replace with a proper bouncy bar ItemCache.ReloadProgressHud.isEnabled = true + logger.info("Repo reload started.") neuRepo.reload() + logger.info("Repo reload completed.") } catch (exc: NEURepositoryException) { ErrorUtil.softError("Failed to reload repository", exc) MC.sendChat( @@ -171,4 +179,7 @@ object RepoManager { return PetData(Rarity.entries[intIndex], petId, 0.0, true) } + fun getRepoRef(): String { + return "${Config.username}/${Config.reponame}#${Config.branch}" + } } -- cgit