Skip to content

Commit

Permalink
trigger refresh after private share
Browse files Browse the repository at this point in the history
Signed-off-by: parneet-guraya <[email protected]>
  • Loading branch information
parneet-guraya committed Aug 12, 2024
1 parent b643243 commit c0f49a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ class ShareActivity : FileActivity(), ShareFragmentListener {
is UIResult.Loading -> {
showLoadingDialog(R.string.common_loading)
}
is UIResult.Success -> {}
is UIResult.Success -> {
// Needs to trigger refresh after creation because creation request returns wrong path resulting list not getting updated.
shareViewModel.refreshSharesFromNetwork()
}
}
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class ShareViewModel(
refreshSharesFromNetwork()
}

private fun refreshSharesFromNetwork() = runUseCaseWithResultAndUseCachedData(
fun refreshSharesFromNetwork() = runUseCaseWithResultAndUseCachedData(
coroutineDispatcher = coroutineDispatcherProvider.io,
cachedData = sharesLiveData.value,
liveData = _shares,
Expand Down

0 comments on commit c0f49a7

Please sign in to comment.