Fixed: The Resume button was functional while downloading ZIM files, even when they were paused due to no internet connection. We have added a check before pausing or resuming the download. If there is no internet connection, we now display the same "No Internet connection" snackbar message that is shown when attempting to download a book without an internet connection.

This commit is contained in:
MohitMaliFtechiz 2024-12-12 15:50:14 +05:30 committed by Kelson
parent 136dc3cef0
commit a17ccefd89

View File

@ -148,6 +148,10 @@ class OnlineLibraryFragment : BaseFragment(), FragmentActivityExtensions {
},
{
context?.let { context ->
if (isNotConnected) {
noInternetSnackbar()
return@let
}
downloader.pauseResumeDownload(
it.downloadId,
it.downloadState.toReadableState(context).contains(getString(string.paused_state))