Skip to content

Commit

Permalink
Fix linting warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Edgiest05 committed Dec 1, 2024
1 parent f21e159 commit 44e7513
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions lib/components/home/sort_button.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import 'dart:io';
import 'dart:math';

import 'package:flutter/material.dart';
import 'package:saber/data/file_manager/file_manager.dart';
Expand Down Expand Up @@ -58,7 +57,8 @@ class SortNotes {
static DateTime _getDirLastModified(Directory dir) {
assert(dir.existsSync());
DateTime out = dir.statSync().modified;
for (FileSystemEntity entity in dir.listSync(recursive: true, followLinks: false)) {
for (FileSystemEntity entity
in dir.listSync(recursive: true, followLinks: false)) {
if (entity is File && entity.absolute.path.endsWith(Editor.extension)) {
final DateTime curFileModified = entity.lastModifiedSync();
if (curFileModified.isAfter(out)) out = curFileModified;
Expand Down Expand Up @@ -86,7 +86,8 @@ class SortNotes {
static int _getDirSize(Directory dir) {
assert(dir.existsSync());
int out = 0;
for (FileSystemEntity entity in dir.listSync(recursive: true, followLinks: false)) {
for (FileSystemEntity entity
in dir.listSync(recursive: true, followLinks: false)) {
if (entity is File && entity.absolute.path.endsWith(Editor.extension)) {
final int curFileSize = entity.lengthSync();
out += curFileSize;
Expand Down
4 changes: 1 addition & 3 deletions lib/pages/home/browse.dart
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,7 @@ class _BrowsePageState extends State<BrowsePage> {
await FileManager.deleteDirectory(folderPath);
findChildrenOfPath();
},
folders: folders
.map((e) => e.split('/').last)
.toList(),
folders: folders.map((e) => e.split('/').last).toList(),
),
if (children == null) ...[
// loading
Expand Down

0 comments on commit 44e7513

Please sign in to comment.