From 079791e14fbc6cb00129bdcdce56eef05855609c Mon Sep 17 00:00:00 2001 From: Hasib Prince Date: Mon, 11 Sep 2023 20:43:33 +0600 Subject: [PATCH] fixed: redundant get authobject call --- .../e/apps/data/login/LoginSourceRepository.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/foundation/e/apps/data/login/LoginSourceRepository.kt b/app/src/main/java/foundation/e/apps/data/login/LoginSourceRepository.kt index 7cf920cbb..fea7939b6 100644 --- a/app/src/main/java/foundation/e/apps/data/login/LoginSourceRepository.kt +++ b/app/src/main/java/foundation/e/apps/data/login/LoginSourceRepository.kt @@ -43,10 +43,13 @@ class LoginSourceRepository @Inject constructor( if (source::class.java.simpleName in clearAuthTypes) { source.clearSavedAuth() } - if (source is LoginSourceGPlay) { - gplayAuth = source.getAuthObject().result.data + + val authObject = source.getAuthObject() + authObjectsLocal.add(authObject) + + if (authObject is AuthObject.GPlayAuth) { + gplayAuth = authObject.result.data } - authObjectsLocal.add(source.getAuthObject()) } return authObjectsLocal -- GitLab