Commit f8807813 authored by Konstantin Tskhovrebov's avatar Konstantin Tskhovrebov 🤖

Merge branch 'feature/project_files_tab_error_fix' into 'feature/project_files_tab'

Fix bug navigation into directories in case of error.

See merge request terrakok/gitlab-client!151
parents 19222afc 6f1be60c
......@@ -154,7 +154,10 @@ class ProjectFilesPresenter @Inject constructor(
}
override fun showErrorMessage(error: Throwable) {
errorHandler.proceed(error, { viewState.showMessage(it) })
// Hide old files to prevent navigation into the same directories.
viewState.showEmptyView(true)
viewState.showFiles(false, emptyList())
errorHandler.proceed(error, { viewState.showEmptyError(true, it) })
}
override fun showEmptyView(show: Boolean) {
......@@ -162,6 +165,8 @@ class ProjectFilesPresenter @Inject constructor(
}
override fun showData(show: Boolean, data: List<ProjectFile>) {
// Hide empty view, if it was hidden in case of error.
viewState.showEmptyView(false)
viewState.showFiles(show, data)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment