From c4ea98f6be8fd31f64447eb4dc5d7d7a61e16b17 Mon Sep 17 00:00:00 2001 From: Alex <51419598+alexrintt@users.noreply.github.com> Date: Wed, 15 Nov 2023 00:16:33 -0300 Subject: [PATCH] Remove duplicated line from ScopedStorage example --- .../storage/scopedstorage/saf/SelectDocumentFileViewModel.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ScopedStorage/app/src/main/java/com/samples/storage/scopedstorage/saf/SelectDocumentFileViewModel.kt b/ScopedStorage/app/src/main/java/com/samples/storage/scopedstorage/saf/SelectDocumentFileViewModel.kt index 5548c281..862beef7 100644 --- a/ScopedStorage/app/src/main/java/com/samples/storage/scopedstorage/saf/SelectDocumentFileViewModel.kt +++ b/ScopedStorage/app/src/main/java/com/samples/storage/scopedstorage/saf/SelectDocumentFileViewModel.kt @@ -57,8 +57,6 @@ class SelectDocumentFileViewModel( @SuppressLint("NewApi") fun onFileSelect(uri: Uri) { viewModelScope.launch { - savedStateHandle[SELECTED_FILE_KEY] = SafUtils.getResourceByUri(context, uri) - try { savedStateHandle[SELECTED_FILE_KEY] = SafUtils.getResourceByUri(context, uri) } catch (e: Exception) { @@ -67,4 +65,4 @@ class SelectDocumentFileViewModel( } } } -} \ No newline at end of file +}