Skip to content

AND-145: add TextValue#63

Open
EmogurovAnton wants to merge 5 commits intomainfrom
feature/AND-145-add-textvalue
Open

AND-145: add TextValue#63
EmogurovAnton wants to merge 5 commits intomainfrom
feature/AND-145-add-textvalue

Conversation

@EmogurovAnton
Copy link
Copy Markdown
Contributor

No description provided.

@Composable
@ReadOnlyComposable
public fun stringResource(text: TextValue): String {
val resources = resources()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Просто ресурсы resources() выносить не имеет смысла,
либо все в return

return resources.getString(text)

либо

val string = resources().getString(text)
return string

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Он вынесен в отдельный метод по аналогии с реализацией оригинального stringResource. Имеет смысл ориентироваться на реализацию из Compose.

@Composable
@ReadOnlyComposable
private fun resources(): Resources {
LocalConfiguration.current
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

зачем это нужно?

@Composable
@ReadOnlyComposable
public fun stringResource(text: TextValue): String {
val resources = resources()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Он вынесен в отдельный метод по аналогии с реализацией оригинального stringResource. Имеет смысл ориентироваться на реализацию из Compose.

Comment thread textvalue/textvalue-common/build.gradle.kts Outdated
Comment thread textvalue/README.md Outdated
Comment thread textvalue/README.md Outdated
Comment thread textvalue/README.md Outdated
Comment thread textvalue/README.md Outdated
Comment thread textvalue/README.md Outdated
Comment thread README.md Outdated
osipxd
osipxd previously approved these changes Nov 5, 2024
Copy link
Copy Markdown
Collaborator

@osipxd osipxd left a comment

Choose a reason for hiding this comment

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

LGTM, one minor comment left

Comment thread README.md
- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.gears/kotlin?style=flat-square&label=viewmodelevents-compose)][viewmodelevents-compose] — A set of extensions for dealing with ViewModelEvents inside `@Composable` functions
- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.gears/kotlin?style=flat-square&label=viewmodelevents-flow)][viewmodelevents-flow] — An implementation of ViewModelEvents via `Flow`
- [![Version](https://img.shields.io/maven-central/v/com.redmadrobot.gears/kotlin?style=flat-square&label=viewmodelevents-livedata)][viewmodelevents-livedata] — An implementation of ViewModelEvents via `LiveData`
`ViewModelEvents` addresses the challenge of buffering and consuming one-time events:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
`ViewModelEvents` addresses the challenge of buffering and consuming one-time events:
`ViewModelEvents` addresses the challenge of buffering and consuming one-time events.

@EmogurovAnton EmogurovAnton requested review from TopHlop and removed request for Sx1a9z4f January 13, 2026 12:02
Comment thread textvalue/textvalue-compose/build.gradle.kts
@EmogurovAnton
Copy link
Copy Markdown
Contributor Author

@osipxd, за 1.5 года контекст немного потерялся, по этому комментарию что-то нужно сделать?

@osipxd
Copy link
Copy Markdown
Collaborator

osipxd commented Jan 21, 2026

Кажется, что можно ничего не править

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.

5 participants