solved some pr comments

This commit is contained in:
2024-04-06 13:34:52 +02:00
parent 277b3366f9
commit e901f139d6
2 changed files with 43 additions and 30 deletions

View File

@ -1,5 +1,4 @@
import 'dart:developer';
import 'dart:io';
import 'package:flutter/material.dart';
@ -92,8 +91,6 @@ class _FilesState extends State<Files> {
ListFilesCache(
path: widget.path.isEmpty ? '/' : widget.path.join('/'),
onUpdate: (ListFilesResponse d) {
log('_query');
if(!context.mounted) return; // prevent setState when widget is possibly already disposed
d.files.removeWhere((element) => element.name.isEmpty || element.name == widget.path.lastOrNull());
setState(() {
data = d;