Address lint issues #4

Merged
wbrawner merged 6 commits from lint-fixes into main 2024-08-02 23:13:33 +00:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 840ebc4fd1 - Show all commits

View file

@ -235,7 +235,9 @@ class MarkdownTests {
val markdownMatcher = SemanticsMatcher("Markdown = [$markdown]") {
it.config.getOrNull(SemanticsProperties.EditableText)?.text == markdown
}
onNode(hasSetTextAction()).assert(markdownMatcher)
onNode(hasSetTextAction()).waitUntil {
assert(markdownMatcher)
}
}
private fun ComposeTestRule.openPreview() = onNodeWithText("Preview").performClick()

View file

@ -209,7 +209,8 @@ class MarkdownViewModel(
))
return
}
_state.value = EditorState(fileName = untitledFileName)
_state.value =
EditorState(fileName = untitledFileName, reloadToggle = _state.value.reloadToggle.inv())
Timber.i("Removing autosave uri from shared prefs")
preferenceHelper[Preference.AUTOSAVE_URI] = null
}