mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-05 04:40:37 +00:00
Changed queries and added macOS support
This commit is contained in:
parent
6ba9eecf8e
commit
e53f4f5972
40 changed files with 1680 additions and 214 deletions
|
@ -1,6 +1,7 @@
|
|||
// ignore_for_file: use_build_context_synchronously, depend_on_referenced_packages
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:animations/animations.dart';
|
||||
|
@ -53,12 +54,14 @@ class _BaseState extends State<Base> with WidgetsBindingObserver {
|
|||
}
|
||||
|
||||
Future<GitHubRelease?> checkInstallationSource() async {
|
||||
Source installationSource = await StoreChecker.getSource;
|
||||
if (installationSource != Source.IS_INSTALLED_FROM_PLAY_STORE) {
|
||||
final result = await checkAppUpdatesGitHub();
|
||||
if (result['result'] == 'success') {
|
||||
if (updateExists(widget.appConfigProvider.getAppInfo!.version, result['body'].tagName)) {
|
||||
return result['body'];
|
||||
if (Platform.isAndroid) {
|
||||
Source installationSource = await StoreChecker.getSource;
|
||||
if (installationSource != Source.IS_INSTALLED_FROM_PLAY_STORE) {
|
||||
final result = await checkAppUpdatesGitHub();
|
||||
if (result['result'] == 'success') {
|
||||
if (updateExists(widget.appConfigProvider.getAppInfo!.version, result['body'].tagName)) {
|
||||
return result['body'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue