From d0c16c6c2e1b9fd8dba0642394b658757ebb3aff Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Sat, 17 Dec 2022 10:20:02 +0100 Subject: [PATCH] Rename --- .../src/main/java/info/hannes/github/AppUpdateHelper.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/githubAppUpdate/src/main/java/info/hannes/github/AppUpdateHelper.kt b/githubAppUpdate/src/main/java/info/hannes/github/AppUpdateHelper.kt index 623b8b4..1d44596 100644 --- a/githubAppUpdate/src/main/java/info/hannes/github/AppUpdateHelper.kt +++ b/githubAppUpdate/src/main/java/info/hannes/github/AppUpdateHelper.kt @@ -48,7 +48,6 @@ object AppUpdateHelper { DownloadWorker.run(activity, currentVersionName, gitRepoUrl, repeatTime, timeUnit) } - // with user feedback fun checkWithDialog( activity: AppCompatActivity, gitRepoUrl: String, @@ -63,7 +62,7 @@ object AppUpdateHelper { if (force || prefs.getLong(key, 0) < System.currentTimeMillis() - 1000 * 3600 * 24 / 24 / 60 * 5) { try { - val versionList = requestVersions(gitRepoUrl) + val versionList = requestGithubVersions(gitRepoUrl) prefs.edit().putLong(key, System.currentTimeMillis()).apply() versionList.body()?.firstOrNull()?.let { release -> @@ -112,7 +111,7 @@ object AppUpdateHelper { return client.github.getGithubVersions(gitRepoUrl.user(), gitRepoUrl.repo()).execute() } - private suspend fun requestVersions(gitRepoUrl: String): Response> { + private suspend fun requestGithubVersions(gitRepoUrl: String): Response> { val versionList = withContext(Dispatchers.Default) { val client = GithubClient(HttpLoggingInterceptor.Level.BODY) client.github.getGithubVersions(gitRepoUrl.user(), gitRepoUrl.repo()).execute()