Compare commits

...

2 Commits

Author SHA1 Message Date
Imran Remtulla
9193788356 Merge pull request #438 from ImranR98/dev
Better downloaded file naming (reduces conflicts)
2023-04-06 23:00:28 -04:00
Imran Remtulla
8f75ddd43f Better download file naming (reduces conflicts) 2023-04-06 22:59:40 -04:00
3 changed files with 4 additions and 5 deletions

View File

@@ -21,7 +21,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart';
// ignore: implementation_imports
import 'package:easy_localization/src/localization.dart';
const String currentVersion = '0.11.26';
const String currentVersion = '0.11.27';
const String currentReleaseTag =
'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES

View File

@@ -165,11 +165,10 @@ class AppsProvider with ChangeNotifier {
notifyListeners();
}
try {
var fileName =
'${app.id}-${app.latestVersion}-${app.preferredApkIndex}.apk';
String downloadUrl = await SourceProvider()
.getSource(app.url)
.apkUrlPrefetchModifier(app.apkUrls[app.preferredApkIndex].value);
var fileName = '${app.id}-${downloadUrl.hashCode}.apk';
var notif = DownloadNotification(app.name, 100);
notificationsProvider?.cancel(notif.id);
int? prevProg;
@@ -205,7 +204,7 @@ class AppsProvider with ChangeNotifier {
var originalAppId = app.id;
app.id = newInfo.packageName;
downloadedFile = downloadedFile.renameSync(
'${downloadedFile.parent.path}/${app.id}-${app.latestVersion}-${app.preferredApkIndex}.apk');
'${downloadedFile.parent.path}/${app.id}-${downloadUrl.hashCode}.apk');
if (apps[originalAppId] != null) {
await removeApps([originalAppId]);
await saveApps([app]);

View File

@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 0.11.26+148 # When changing this, update the tag in main() accordingly
version: 0.11.27+149 # When changing this, update the tag in main() accordingly
environment:
sdk: '>=2.18.2 <3.0.0'