Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add string resources for AI-UI module #2020

Merged
merged 2 commits into from
Feb 2, 2024
Merged

Conversation

yschimke
Copy link
Collaborator

@yschimke yschimke commented Feb 2, 2024

WHAT

Add string resources for AI-UI module

WHY

Good citizen

HOW

Checklist 📋

  • Add explicit visibility modifier and explicit return types for public declarations
  • Run spotless check
  • Run tests
  • Update metalava's signature text files

Copy link
Member

@luizgrp luizgrp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

public data class FailedResponseUiModel(public val message: String) : PromptOrResponseUiModel {
public companion object {
public val NoCompanion: FailedResponseUiModel =
FailedResponseUiModel("No companion app found")
public fun NoCompanion(context: Context): FailedResponseUiModel =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: usually it is avoided to pass reference of context to viewmodels in order to prevent further mistakes of holding an instance of it (which is not the case here)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I guess to use this I'd have to implement AndroidViewModel which gets the application context.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's more a helper method, I might give it some thought and follow up just removing this, or moving to a Screen.

@yschimke yschimke closed this Feb 2, 2024
@yschimke yschimke reopened this Feb 2, 2024
@yschimke yschimke merged commit 138751f into google:main Feb 2, 2024
4 checks passed
@yschimke yschimke deleted the fix_strings branch February 13, 2024 15:12
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