fix: do not ask for patches consent before initializing model

This commit is contained in:
aAbed 2023-09-30 14:57:48 +05:45
parent 2e8e3b0d1e
commit 1e8d8f749a

View File

@ -41,11 +41,10 @@ class HomeViewModel extends BaseViewModel {
File? downloadedApk; File? downloadedApk;
Future<void> initialize(BuildContext context) async { Future<void> initialize(BuildContext context) async {
_latestManagerVersion = await _managerAPI.getLatestManagerVersion();
if (!_managerAPI.getPatchesConsent()) { if (!_managerAPI.getPatchesConsent()) {
await showPatchesConsent(context); await showPatchesConsent(context);
} }
_latestManagerVersion = await _managerAPI.getLatestManagerVersion();
await _patcherAPI.initialize(); await _patcherAPI.initialize();
await flutterLocalNotificationsPlugin.initialize( await flutterLocalNotificationsPlugin.initialize(
const InitializationSettings( const InitializationSettings(