Skip to content

fixed issue for server list empty state not showing correctly #668

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

Merged
merged 2 commits into from
Apr 29, 2025

Conversation

Elelan
Copy link

@Elelan Elelan commented Apr 29, 2025

No description provided.

Comment on lines +38 to +39

viewModelOf(::SpaceListViewModel)

Check warning

Code scanning / detekt

Reports consecutive blank lines Warning

Needless blank line(s)
@@ -36,8 +36,15 @@

binding.composeViewSpaceList.setContent {

val viewModel: SpaceListViewModel = koinViewModel()

Check warning

Code scanning / detekt

Reports multiple space usages Warning

Unnecessary long whitespace
Comment on lines +36 to +37

class SpaceListViewModel() : ViewModel() {

Check warning

Code scanning / detekt

Reports consecutive blank lines Warning

Needless blank line(s)
Comment on lines +37 to +45
class SpaceListViewModel() : ViewModel() {

private val _spaceList = MutableStateFlow<List<Space>>(emptyList())
val spaceList: StateFlow<List<Space>> = _spaceList

fun refreshSpaces() {
_spaceList.value = Space.getAll().asSequence().toList()
}
}

Check warning

Code scanning / detekt

Library classes should not be public. Warning

Class SpaceListViewModel should not be public
import org.koin.androidx.compose.koinViewModel


class SpaceListViewModel() : ViewModel() {

Check warning

Code scanning / detekt

If a source file contains only a single non-private top-level class or object, the file name should reflect the case-sensitive name plus the .kt extension. Warning

The file name 'SpaceListScreen' does not match the name of the single top-level declaration 'SpaceListViewModel'.
import org.koin.androidx.compose.koinViewModel


class SpaceListViewModel() : ViewModel() {

Check warning

Code scanning / detekt

Empty block of code detected. As they serve no purpose they should be removed. Warning

An empty default constructor can be removed.
@Elelan Elelan merged commit c6bd237 into next Apr 29, 2025
2 checks passed
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.

1 participant