libtd-ktx / kotlinx.telegram.coroutines / cancelDownloadFile
cancelDownloadFile
suspend fun
TelegramFlow
.cancelDownloadFile(fileId:
Int
, onlyIfPending:
Boolean
):
Unit
Suspend function, which stops the downloading of a file. If a file has already been downloaded, does nothing.
Parameters
fileId
- Identifier of a file to stop downloading.
onlyIfPending
- Pass true to stop downloading only if it hasn’t been started, i.e. request
hasn’t been sent to server.