image previews - dan comments - wip
This commit is contained in:
parent
c78dbf0ac3
commit
d329e7cc06
|
@ -49,12 +49,14 @@ abstract class Cwtch {
|
|||
void ShareFile(String profile, int handle, String filepath);
|
||||
// ignore: non_constant_identifier_names
|
||||
void DownloadFile(String profile, int handle, String filepath, String manifestpath, String filekey);
|
||||
// android-only
|
||||
// ignore: non_constant_identifier_names
|
||||
void CreateDownloadableFile(String profile, int handle, String filenameSuggestion, String filekey);
|
||||
// ignore: non_constant_identifier_names
|
||||
void CheckDownloadStatus(String profile, String fileKey);
|
||||
// ignore: non_constant_identifier_names
|
||||
void VerifyOrResumeDownload(String profile, int handle, String filekey);
|
||||
// android-only
|
||||
// ignore: non_constant_identifier_names
|
||||
void ExportPreviewedFile(String sourceFile, String suggestion);
|
||||
|
||||
|
|
|
@ -700,7 +700,7 @@ class CwtchFfi implements Cwtch {
|
|||
@override
|
||||
String defaultDownloadPath() {
|
||||
Map<String, String> envVars = Platform.environment;
|
||||
return path.join(envVars['HOME']!, "Downloads");
|
||||
return path.join(envVars[Platform.isWindows ? 'UserProfile' : 'HOME']!, "Downloads");
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
@ -399,15 +399,14 @@ class ProfileInfoState extends ChangeNotifier {
|
|||
if (progress < 0) {
|
||||
this._downloads[fileKey]!.interrupted = true;
|
||||
}
|
||||
notifyListeners();
|
||||
} else {
|
||||
if (this._downloads[fileKey]!.interrupted) {
|
||||
this._downloads[fileKey]!.interrupted = false;
|
||||
}
|
||||
this._downloads[fileKey]!.chunksDownloaded = progress;
|
||||
this._downloads[fileKey]!.chunksTotal = numChunks;
|
||||
notifyListeners();
|
||||
}
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
void downloadMarkManifest(String fileKey) {
|
||||
|
|
Loading…
Reference in New Issue