mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-25 16:26:07 +00:00
Fixed issue load logs with filters applied
This commit is contained in:
parent
c5b534a980
commit
c39abf08ae
2 changed files with 9 additions and 4 deletions
|
@ -7,7 +7,6 @@ import 'package:adguard_home_manager/models/dns_info.dart';
|
||||||
import 'package:adguard_home_manager/models/rewrite_rules.dart';
|
import 'package:adguard_home_manager/models/rewrite_rules.dart';
|
||||||
import 'package:adguard_home_manager/models/filtering_status.dart';
|
import 'package:adguard_home_manager/models/filtering_status.dart';
|
||||||
import 'package:adguard_home_manager/models/clients_allowed_blocked.dart';
|
import 'package:adguard_home_manager/models/clients_allowed_blocked.dart';
|
||||||
import 'package:adguard_home_manager/models/encryption.dart';
|
|
||||||
import 'package:adguard_home_manager/models/clients.dart';
|
import 'package:adguard_home_manager/models/clients.dart';
|
||||||
import 'package:adguard_home_manager/models/server_status.dart';
|
import 'package:adguard_home_manager/models/server_status.dart';
|
||||||
import 'package:adguard_home_manager/models/server.dart';
|
import 'package:adguard_home_manager/models/server.dart';
|
||||||
|
|
|
@ -30,6 +30,8 @@ class Logs extends StatelessWidget {
|
||||||
serversProvider: serversProvider,
|
serversProvider: serversProvider,
|
||||||
appConfigProvider: appConfigProvider,
|
appConfigProvider: appConfigProvider,
|
||||||
logsProvider: logsProvider,
|
logsProvider: logsProvider,
|
||||||
|
selectedResultStatus: logsProvider.appliedFilters.selectedResultStatus,
|
||||||
|
searchText: logsProvider.appliedFilters.searchText,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,12 +40,16 @@ class LogsWidget extends StatefulWidget {
|
||||||
final ServersProvider serversProvider;
|
final ServersProvider serversProvider;
|
||||||
final AppConfigProvider appConfigProvider;
|
final AppConfigProvider appConfigProvider;
|
||||||
final LogsProvider logsProvider;
|
final LogsProvider logsProvider;
|
||||||
|
final String selectedResultStatus;
|
||||||
|
final String? searchText;
|
||||||
|
|
||||||
const LogsWidget({
|
const LogsWidget({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.serversProvider,
|
required this.serversProvider,
|
||||||
required this.appConfigProvider,
|
required this.appConfigProvider,
|
||||||
required this.logsProvider,
|
required this.logsProvider,
|
||||||
|
required this.selectedResultStatus,
|
||||||
|
required this.searchText,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -65,8 +71,8 @@ class _LogsWidgetState extends State<LogsWidget> {
|
||||||
}) async {
|
}) async {
|
||||||
int offst = inOffset ?? widget.logsProvider.offset;
|
int offst = inOffset ?? widget.logsProvider.offset;
|
||||||
|
|
||||||
String resStatus = responseStatus ?? widget.logsProvider.selectedResultStatus;
|
String resStatus = responseStatus ?? widget.selectedResultStatus;
|
||||||
String? search = searchText ?? widget.logsProvider.searchText;
|
String? search = searchText ?? widget.searchText;
|
||||||
|
|
||||||
if (loadingMore != null && loadingMore == true) {
|
if (loadingMore != null && loadingMore == true) {
|
||||||
setState(() => isLoadingMore = true);
|
setState(() => isLoadingMore = true);
|
||||||
|
@ -408,7 +414,7 @@ class _LogsWidgetState extends State<LogsWidget> {
|
||||||
logsProvider.setSearchText(null);
|
logsProvider.setSearchText(null);
|
||||||
fetchLogs(
|
fetchLogs(
|
||||||
inOffset: 0,
|
inOffset: 0,
|
||||||
searchText: null
|
searchText: ''
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Reference in a new issue