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 general small fixes #1026

Merged
merged 1 commit into from
Jul 12, 2023
Merged

Add general small fixes #1026

merged 1 commit into from
Jul 12, 2023

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Jul 12, 2023

These were mostly included in #1015

@@ -26,5 +26,5 @@ fun getCurrentAccount(accountViewModel: AccountViewModel): Account? {
}

fun getPostViewMode(appSettingsViewModel: AppSettingsViewModel): PostViewMode {
return PostViewMode.values()[(appSettingsViewModel.appSettings.value ?: APP_SETTINGS_DEFAULT).postViewMode]
return getEnumFromIntSetting<PostViewMode>(appSettingsViewModel.appSettings) { it.postViewMode }
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't seem any less verbose, but it works.

@dessalines dessalines merged commit 4d55ee0 into LemmyNet:main Jul 12, 2023
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