Workaround to prevent crash on first run (#898)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
(cherry picked from commit 57f125a4da
)
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
52808fb126
commit
b663fbe64f
1 changed files with 1 additions and 0 deletions
|
@ -291,6 +291,7 @@ class SearchableRepositoryViewModel(application: Application) : AndroidViewModel
|
|||
recyclerViewState: Parcelable? = null,
|
||||
pushPreviousLocation: Boolean = true
|
||||
) {
|
||||
if (!newDirectory.exists()) return
|
||||
require(newDirectory.isDirectory) { "Can only navigate to a directory" }
|
||||
if (pushPreviousLocation) {
|
||||
navigationStack.push(NavigationStackEntry(_currentDir.value!!, recyclerViewState))
|
||||
|
|
Loading…
Reference in a new issue