Skip to content

Android: fix compile error from duplicate companion object (#414 follow-up) - #416

Merged
Dvorinka merged 1 commit into
Dvorinka:masterfrom
dxts:fix/android-login-companion-object
Nov 5, 2026
Merged

Dvorinka merged 1 commit into
Dvorinka:masterfrom
dxts:fix/android-login-companion-object

Conversation

@dxts

@dxts dxts commented Nov 4, 2026

Copy link
Copy Markdown

#414 added a second companion object to LoginViewModel for the 2FA result codes, but the class already had one holding the OAuth constants. Kotlin allows only one per class, so :app:compileDebugKotlin on current master fails with:

e: LoginViewModel.kt:150:50 Unresolved reference 'OAUTH_CLIENT_ID'.
e: LoginViewModel.kt:204:5 Only one companion object is allowed per class.

This moves CODE_NOT_FULLY_SUCCESS and CODE_NOT_FOUND into the existing companion object. No behaviour change.

Verified with ./gradlew :app:assembleDebug on JDK 21 (AGP 8.9.3). Apologies for the breakage: I had no Android SDK available when opening #414 and noted that there; this is the first real compile.

Dvorinka#414 added a second companion object for the 2FA result codes, but the
class already had one holding the OAuth constants. Kotlin allows only one
per class, so compileDebugKotlin failed with "Only one companion object is
allowed per class" and unresolved OAUTH_* references. Move the two constants
into the existing companion object. Verified with ./gradlew :app:assembleDebug
on JDK 21.
@mira-tdvorak

mira-tdvorak Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Mira PR Walkthrough


❌ Review failed — click for details

The code review failed to complete due to an unexpected error.

Stage: Code review
Error type: LLMError
Message: LLM tool-call failed

@Dvorinka
Dvorinka merged commit e1229b0 into Dvorinka:master Nov 5, 2026
5 checks passed
@dxts
dxts deleted the fix/android-login-companion-object branch November 9, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants