Fixes stability of the feedstate
This commit is contained in:
@@ -28,14 +28,18 @@ import kotlinx.coroutines.flow.MutableStateFlow
|
|||||||
|
|
||||||
@Stable
|
@Stable
|
||||||
sealed class FeedState {
|
sealed class FeedState {
|
||||||
|
@Stable
|
||||||
object Loading : FeedState()
|
object Loading : FeedState()
|
||||||
|
|
||||||
|
@Stable
|
||||||
class Loaded(
|
class Loaded(
|
||||||
val feed: MutableStateFlow<LoadedFeedState<Note>>,
|
val feed: MutableStateFlow<LoadedFeedState<Note>>,
|
||||||
) : FeedState()
|
) : FeedState()
|
||||||
|
|
||||||
|
@Stable
|
||||||
object Empty : FeedState()
|
object Empty : FeedState()
|
||||||
|
|
||||||
|
@Stable
|
||||||
class FeedError(
|
class FeedError(
|
||||||
val errorMessage: String,
|
val errorMessage: String,
|
||||||
) : FeedState()
|
) : FeedState()
|
||||||
|
|||||||
Reference in New Issue
Block a user