mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-30 04:53:28 +01:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			v0.6.10-be
			...
			v0.6.11-be
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | e158c23cca | ||
|  | 208f125e12 | ||
|  | b7ccf3fa49 | 
| @@ -15,7 +15,7 @@ import 'package:dynamic_color/dynamic_color.dart'; | ||||
| import 'package:device_info_plus/device_info_plus.dart'; | ||||
| import 'package:android_alarm_manager_plus/android_alarm_manager_plus.dart'; | ||||
|  | ||||
| const String currentVersion = '0.6.10'; | ||||
| const String currentVersion = '0.6.11'; | ||||
| const String currentReleaseTag = | ||||
|     'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES | ||||
|  | ||||
|   | ||||
| @@ -62,7 +62,6 @@ class _ImportExportPageState extends State<ImportExportPage> { | ||||
|         body: CustomScrollView(slivers: <Widget>[ | ||||
|           const CustomAppBar(title: 'Import/Export'), | ||||
|           SliverFillRemaining( | ||||
|               hasScrollBody: false, | ||||
|               child: Padding( | ||||
|                   padding: | ||||
|                       const EdgeInsets.symmetric(vertical: 8, horizontal: 16), | ||||
| @@ -316,7 +315,19 @@ class _ImportExportPageState extends State<ImportExportPage> { | ||||
|                                               }, | ||||
|                                         child: Text('Import ${source.name}')) | ||||
|                                   ])) | ||||
|                           .toList() | ||||
|                           .toList(), | ||||
|                       const Spacer(), | ||||
|                       const Divider( | ||||
|                         height: 32, | ||||
|                       ), | ||||
|                       const Text( | ||||
|                           'Imported Apps may incorrectly show as "Not Installed".\nTo fix this, re-install them through Obtainium.\nThis should not affect App data.\n\nOnly affects URL and third-party import methods.', | ||||
|                           textAlign: TextAlign.center, | ||||
|                           style: TextStyle( | ||||
|                               fontStyle: FontStyle.italic, fontSize: 12)), | ||||
|                       const SizedBox( | ||||
|                         height: 8, | ||||
|                       ) | ||||
|                     ], | ||||
|                   ))) | ||||
|         ])); | ||||
|   | ||||
| @@ -139,12 +139,17 @@ class AppsProvider with ChangeNotifier { | ||||
|     // The former case should be handled (give the App its real ID), the latter is a security issue | ||||
|     var newInfo = await PackageArchiveInfo.fromPath(downloadedFile.path); | ||||
|     if (app.id != newInfo.packageName) { | ||||
|       if (apps[app.id] != null) { | ||||
|       if (apps[app.id] != null && !SourceProvider().isTempId(app.id)) { | ||||
|         throw IDChangedError(); | ||||
|       } | ||||
|       var originalAppId = app.id; | ||||
|       app.id = newInfo.packageName; | ||||
|       downloadedFile = downloadedFile.renameSync( | ||||
|           '${downloadedFile.parent.path}/${app.id}-${app.latestVersion}-${app.preferredApkIndex}.apk'); | ||||
|       if (apps[originalAppId] != null) { | ||||
|         await removeApps([originalAppId]); | ||||
|         await saveApps([app]); | ||||
|       } | ||||
|     } | ||||
|     return DownloadedApk(app.id, downloadedFile); | ||||
|   } | ||||
|   | ||||
| @@ -191,6 +191,19 @@ class SourceProvider { | ||||
|   String generateTempID(AppNames names, AppSource source) => | ||||
|       '${names.author.toLowerCase()}_${names.name.toLowerCase()}_${source.host}'; | ||||
|  | ||||
|   bool isTempId(String id) { | ||||
|     List<String> parts = id.split('_'); | ||||
|     if (parts.length < 3) { | ||||
|       return false; | ||||
|     } | ||||
|     for (int i = 0; i < parts.length - 1; i++) { | ||||
|       if (RegExp('.*[A-Z].*').hasMatch(parts[i])) { | ||||
|         return false; | ||||
|       } | ||||
|     } | ||||
|     return getSourceHosts().contains(parts.last); | ||||
|   } | ||||
|  | ||||
|   Future<App> getApp(AppSource source, String url, List<String> additionalData, | ||||
|       {String name = '', String? id}) async { | ||||
|     String standardUrl = source.standardizeURL(preStandardizeUrl(url)); | ||||
|   | ||||
| @@ -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.6.10+54 # When changing this, update the tag in main() accordingly | ||||
| version: 0.6.11+55 # When changing this, update the tag in main() accordingly | ||||
|  | ||||
| environment: | ||||
|   sdk: '>=2.18.2 <3.0.0' | ||||
|   | ||||
		Reference in New Issue
	
	Block a user