mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-03-03 14:06:47 +00:00
fix #370
This commit is contained in:
parent
13f62934b7
commit
e9c5d49938
1 changed files with 3 additions and 13 deletions
|
|
@ -57,15 +57,10 @@ Future<bool> isAllowedToDownload(MediaType type) async {
|
||||||
if (options[ConnectivityResult.mobile.name]!
|
if (options[ConnectivityResult.mobile.name]!
|
||||||
.contains(DownloadMediaTypes.video.name)) {
|
.contains(DownloadMediaTypes.video.name)) {
|
||||||
return true;
|
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;
|
|
||||||
}
|
}
|
||||||
|
} else if (options[ConnectivityResult.mobile.name]!
|
||||||
|
.contains(DownloadMediaTypes.image.name)) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (connectivityResult.contains(ConnectivityResult.wifi)) {
|
if (connectivityResult.contains(ConnectivityResult.wifi)) {
|
||||||
|
|
@ -74,11 +69,6 @@ Future<bool> isAllowedToDownload(MediaType type) async {
|
||||||
.contains(DownloadMediaTypes.video.name)) {
|
.contains(DownloadMediaTypes.video.name)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else if (type == MediaType.audio) {
|
|
||||||
if (options[ConnectivityResult.wifi.name]!
|
|
||||||
.contains(DownloadMediaTypes.audio.name)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else if (options[ConnectivityResult.wifi.name]!
|
} else if (options[ConnectivityResult.wifi.name]!
|
||||||
.contains(DownloadMediaTypes.image.name)) {
|
.contains(DownloadMediaTypes.image.name)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue