fix: showing Installed when it's actually not (#1021)

This commit is contained in:
Aabed Khan 2023-07-15 06:55:36 +05:45 committed by GitHub
parent a879ac30fb
commit eb58475259
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 11 deletions

View file

@ -1,12 +1,12 @@
import 'dart:io';
import 'package:app_installer/app_installer.dart';
import 'package:collection/collection.dart';
import 'package:cr_file_saver/file_saver.dart';
import 'package:device_apps/device_apps.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:injectable/injectable.dart';
import 'package:install_plugin/install_plugin.dart';
import 'package:path_provider/path_provider.dart';
import 'package:revanced_manager/app/app.locator.dart';
import 'package:revanced_manager/models/patch.dart';
@ -232,10 +232,8 @@ class PatcherAPI {
);
}
} else {
await AppInstaller.installApk(_outFile!.path);
return await DeviceApps.isAppInstalled(
patchedApp.packageName,
);
final install = await InstallPlugin.installApk(_outFile!.path);
return install['isSuccess'];
}
} on Exception catch (e) {
if (kDebugMode) {