mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 05:52:51 +00:00
Fixed log details screen client mobile
This commit is contained in:
parent
c8d395396a
commit
d628e56248
1 changed files with 21 additions and 7 deletions
|
@ -111,6 +111,8 @@ class _LogsListClientState extends State<LogsListClient> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final width = MediaQuery.of(context).size.width;
|
||||
|
||||
if (widget.ip != previousIp) {
|
||||
setState(() => loadStatus = 0);
|
||||
if (scrollController.hasClients) scrollController.animateTo(0, duration: const Duration(milliseconds: 1), curve: Curves.ease);
|
||||
|
@ -165,13 +167,25 @@ class _LogsListClientState extends State<LogsListClient> {
|
|||
index: index,
|
||||
length: logsData!.data.length,
|
||||
useAlwaysNormalTile: true,
|
||||
onLogTap: (log) => showDialog(
|
||||
context: context,
|
||||
builder: (context) => LogDetailsScreen(
|
||||
log: log,
|
||||
dialog: true
|
||||
)
|
||||
)
|
||||
onLogTap: (log) => {
|
||||
if (width > 700) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => LogDetailsScreen(
|
||||
log: log,
|
||||
dialog: true
|
||||
)
|
||||
)
|
||||
}
|
||||
else {
|
||||
Navigator.push(context, MaterialPageRoute(
|
||||
builder: (context) => LogDetailsScreen(
|
||||
log: log,
|
||||
dialog: false
|
||||
)
|
||||
))
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue