mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 05:52:51 +00:00
Added refresh button on dns settings
This commit is contained in:
parent
42495c8bab
commit
39fa5298f8
1 changed files with 10 additions and 2 deletions
|
@ -43,8 +43,8 @@ class DnsSettingsWidget extends StatefulWidget {
|
|||
|
||||
class _DnsSettingsWidgetState extends State<DnsSettingsWidget> {
|
||||
|
||||
void fetchData() async {
|
||||
widget.serversProvider.setDnsInfoLoadStatus(0, false);
|
||||
void fetchData({bool? showRefreshIndicator}) async {
|
||||
widget.serversProvider.setDnsInfoLoadStatus(0, showRefreshIndicator ?? false);
|
||||
|
||||
final result = await getDnsInfo(server: widget.serversProvider.selectedServer!);
|
||||
|
||||
|
@ -182,6 +182,14 @@ class _DnsSettingsWidgetState extends State<DnsSettingsWidget> {
|
|||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(AppLocalizations.of(context)!.dnsSettings),
|
||||
actions: [
|
||||
IconButton(
|
||||
onPressed: () => fetchData(showRefreshIndicator: true),
|
||||
icon: const Icon(Icons.refresh_rounded),
|
||||
tooltip: AppLocalizations.of(context)!.refresh,
|
||||
),
|
||||
const SizedBox(width: 10)
|
||||
],
|
||||
),
|
||||
body: generateBody(),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue