From 569db9eac85cb95483105147c99d83c9e98435af Mon Sep 17 00:00:00 2001 From: undefiened Date: Sun, 27 Aug 2023 16:23:30 +0200 Subject: [PATCH] Using a proper constant instead of val Co-authored-by: KaiserBh <41852205+KaiserBh@users.noreply.github.com> --- .../tachiyomi/data/sync/service/GoogleDriveSyncService.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/GoogleDriveSyncService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/GoogleDriveSyncService.kt index af93dcc0e..2340b027b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/GoogleDriveSyncService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/GoogleDriveSyncService.kt @@ -152,7 +152,9 @@ class GoogleDriveSyncService(context: Context, json: Json, syncPreferences: Sync class GoogleDriveService(private val context: Context) { var googleDriveService: Drive? = null - private val redirectUri = "eu.kanade.google.oauth:/oauth2redirect" + companion object { + const val REDIRECT_URI = "eu.kanade.google.oauth:/oauth2redirect" + } private val syncPreferences = Injekt.get() init { @@ -210,7 +212,7 @@ class GoogleDriveService(private val context: Context) { ).setAccessType("offline").build() return flow.newAuthorizationUrl() - .setRedirectUri(redirectUri) + .setRedirectUri(REDIRECT_URI) .setApprovalPrompt("force") .build() } @@ -313,7 +315,7 @@ class GoogleDriveService(private val context: Context) { secrets.installed.clientId, secrets.installed.clientSecret, authorizationCode, - redirectUri, + REDIRECT_URI, ).setGrantType("authorization_code").execute() try {