mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-20 22:09:11 +00:00
Small bug fixes
This commit is contained in:
parent
e4298cc062
commit
3c397d208f
2 changed files with 15 additions and 8 deletions
|
@ -1,5 +1,3 @@
|
|||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
@ -133,6 +131,8 @@ class LogTile extends StatelessWidget {
|
|||
|
||||
processModal.close();
|
||||
|
||||
if (!context.mounted) return;
|
||||
|
||||
if (result == true) {
|
||||
showSnacbkar(
|
||||
appConfigProvider: appConfigProvider,
|
||||
|
@ -224,12 +224,15 @@ class LogTile extends StatelessWidget {
|
|||
void openAddClient() {
|
||||
Future.delayed(
|
||||
const Duration(milliseconds: 0),
|
||||
() => openClientFormModal(
|
||||
context: context,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
onConfirm: confirmAddClient,
|
||||
initialData: ClientInitialData(name: "Client ${log.client}", ip: log.client)
|
||||
)
|
||||
() {
|
||||
if (!context.mounted) return;
|
||||
openClientFormModal(
|
||||
context: context,
|
||||
width: MediaQuery.of(context).size.width,
|
||||
onConfirm: confirmAddClient,
|
||||
initialData: ClientInitialData(name: "Client ${log.client}", ip: log.client)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,10 @@ class _TestUpstreamDnsModalState extends State<TestUpstreamDnsModal> {
|
|||
|
||||
void checkDns() async {
|
||||
final dnsProvider = Provider.of<DnsProvider>(context, listen: false);
|
||||
if (dnsProvider.dnsInfo == null) {
|
||||
setState(() => loadStatus = LoadStatus.error);
|
||||
return;
|
||||
}
|
||||
final result = await Provider.of<ServersProvider>(context, listen: false).apiClient2!.testUpstreamDns(
|
||||
body: {
|
||||
"bootstrap_dns": dnsProvider.dnsInfo!.bootstrapDns,
|
||||
|
|
Loading…
Add table
Reference in a new issue