mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 07:48:40 +00:00
fix #370
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
13f62934b7
commit
e9c5d49938
1 changed files with 3 additions and 13 deletions
|
|
@ -57,28 +57,18 @@ Future<bool> isAllowedToDownload(MediaType type) async {
|
|||
if (options[ConnectivityResult.mobile.name]!
|
||||
.contains(DownloadMediaTypes.video.name)) {
|
||||
return true;
|
||||
} else if (type == MediaType.audio) {
|
||||
if (options[ConnectivityResult.mobile.name]!
|
||||
.contains(DownloadMediaTypes.audio.name)) {
|
||||
return true;
|
||||
}
|
||||
} else if (options[ConnectivityResult.mobile.name]!
|
||||
.contains(DownloadMediaTypes.image.name)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (connectivityResult.contains(ConnectivityResult.wifi)) {
|
||||
if (type == MediaType.video) {
|
||||
if (options[ConnectivityResult.wifi.name]!
|
||||
.contains(DownloadMediaTypes.video.name)) {
|
||||
return true;
|
||||
}
|
||||
} else if (type == MediaType.audio) {
|
||||
if (options[ConnectivityResult.wifi.name]!
|
||||
.contains(DownloadMediaTypes.audio.name)) {
|
||||
return true;
|
||||
}
|
||||
} else if (options[ConnectivityResult.wifi.name]!
|
||||
.contains(DownloadMediaTypes.image.name)) {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue