mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-27 18:16:43 +02:00
Avoids remembering edit lists that will never exist.
This commit is contained in:
@@ -1014,7 +1014,7 @@ fun observeEdits(
|
||||
accountViewModel: AccountViewModel,
|
||||
): State<GenericLoadable<EditState>> {
|
||||
if (baseNote.event !is TextNoteEvent) {
|
||||
return remember { mutableStateOf(GenericLoadable.Empty()) }
|
||||
return EmptyState
|
||||
}
|
||||
|
||||
val editState =
|
||||
|
@@ -223,6 +223,8 @@ fun RenderTextModificationEvent(
|
||||
}
|
||||
}
|
||||
|
||||
val EmptyState = mutableStateOf<GenericLoadable<EditState>>(GenericLoadable.Empty())
|
||||
|
||||
@Stable
|
||||
class EditState {
|
||||
private var modificationsList: List<Note> = persistentListOf()
|
||||
|
Reference in New Issue
Block a user