Fix URI logging in ViewModel

This commit is contained in:
William Brawner 2021-02-21 17:14:02 -07:00
parent 14dc55433a
commit 31e81f31b4

View file

@ -66,10 +66,10 @@ class MarkdownViewModel(val timber: Timber.Tree = Timber.asTree()) : ViewModel()
suspend fun save(context: Context, givenUri: Uri? = null): Boolean { suspend fun save(context: Context, givenUri: Uri? = null): Boolean {
val uri = givenUri?.let { val uri = givenUri?.let {
timber.i("Saving file with given uri: $uri") timber.i("Saving file with given uri: $it")
it it
} ?: this.uri.value?.let { } ?: this.uri.value?.let {
timber.i("Saving file with cached uri: $uri") timber.i("Saving file with cached uri: $it")
it it
} ?: run { } ?: run {
timber.w("Save called with no uri") timber.w("Save called with no uri")