mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-07-12 21:06:43 +02:00
Make downgrade detection message more clear (#2342)
This commit is contained in:
@ -53,7 +53,10 @@ class UnsupportedURLError extends ObtainiumError {
|
||||
}
|
||||
|
||||
class DowngradeError extends ObtainiumError {
|
||||
DowngradeError() : super(tr('cantInstallOlderVersion'));
|
||||
DowngradeError(int currentVersionCode, int newVersionCode)
|
||||
: super(
|
||||
'${tr('cantInstallOlderVersion')} (versionCode $currentVersionCode ➔ $newVersionCode)',
|
||||
);
|
||||
}
|
||||
|
||||
class InstallError extends ObtainiumError {
|
||||
|
@ -916,7 +916,7 @@ class AppsProvider with ChangeNotifier {
|
||||
if (appInfo != null &&
|
||||
newInfo.versionCode! < appInfo.versionCode! &&
|
||||
!(await canDowngradeApps())) {
|
||||
throw DowngradeError();
|
||||
throw DowngradeError(appInfo.versionCode!, newInfo.versionCode!);
|
||||
}
|
||||
if (needsBGWorkaround) {
|
||||
// The below 'await' will never return if we are in a background process
|
||||
|
Reference in New Issue
Block a user