Skip to content

Commit d57bd64

Browse files
authored
v6.0.1: Minor Bug Fixes (#67)
* Improved stability during statistic cache resetting Removed example changed checker from auto-builder Updated CHANGELOG Updated dependencies * Updated package version * Updated CHANGELOG Removed prebuilt example applications Former-commit-id: 3c42fbba51d8697cf1d67f5f9aa9d81d341bf82b [formerly 3d0c58c] Former-commit-id: 937353debb7560e959828060883056c739d6d689
1 parent fbf7c75 commit d57bd64

File tree

6 files changed

+17
-40
lines changed

6 files changed

+17
-40
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,30 +43,10 @@ jobs:
4343
- name: Check Lints
4444
run: dart analyze --fatal-infos --fatal-warnings
4545

46-
check-example-changes:
47-
name: "Check Example/Config For Changes"
48-
runs-on: "ubuntu-20.04"
49-
outputs:
50-
example_changed: ${{ steps.check_file_changed.outputs.example_changed }}
51-
steps:
52-
- name: Checkout Repository
53-
uses: actions/checkout@v3
54-
with:
55-
fetch-depth: 2
56-
- name: Compare Commit Diffs
57-
shell: pwsh
58-
id: check_file_changed
59-
run: |
60-
$diff = git diff --name-only HEAD^ HEAD
61-
$SourceDiff = $diff | Where-Object { $_ -match '^example/' -or $_ -match '.iss$'}
62-
$HasDiff = $SourceDiff.Length -gt 0
63-
Write-Host "::set-output name=example_changed::$HasDiff"
64-
6546
build-example:
6647
name: "Build Example Applications"
6748
runs-on: windows-latest
68-
needs: [check-example-changes, content-analysis, package-analysis]
69-
if: needs.check-example-changes.outputs.example_changed == 'True'
49+
needs: [content-analysis, package-analysis]
7050
defaults:
7151
run:
7252
working-directory: ./example
@@ -78,7 +58,6 @@ jobs:
7858
with:
7959
distribution: "temurin"
8060
java-version: "17"
81-
cache: "gradle"
8261
- name: Setup Flutter Environment
8362
uses: subosito/flutter-action@v2
8463
with:

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66

77
---
88

9-
## [6.0.0] - 2022/XX/XX
9+
## [6.0.1] - 2022/09/11
10+
11+
* Improved stability
12+
* Updated dependencies
13+
14+
## [6.0.0] - 2022/09/05
1015

1116
* Added support for flutter_map v3
1217
* Fixed bugs

lib/src/store/statistics.dart

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ class StoreStats {
7272
'length',
7373
'size',
7474
],
75-
}) {
76-
try {
75+
}) =>
7776
(statTypes ??
7877
[
7978
'length',
@@ -82,10 +81,7 @@ class StoreStats {
8281
'cacheMisses',
8382
])
8483
.map((e) => _access.stats >>> '$e.cache')
85-
.forEach((e) => e.deleteSync());
86-
// ignore: empty_catches
87-
} catch (e) {}
88-
}
84+
.forEach((e) => e.existsSync() ? e.deleteSync() : null);
8985

9086
/// Remove the cached statistics asynchronously
9187
///
@@ -97,21 +93,20 @@ class StoreStats {
9793
'length',
9894
'size',
9995
],
100-
}) async {
101-
try {
102-
await Future.wait(
96+
}) =>
97+
Future.wait(
10398
(statTypes ??
10499
[
105100
'length',
106101
'size',
107102
'cacheHits',
108103
'cacheMisses',
109104
])
110-
.map((e) => (_access.stats >>> '$e.cache').delete()),
105+
.map((e) async {
106+
final File file = _access.stats >>> '$e.cache';
107+
return await file.exists() ? file.delete() : null;
108+
}),
111109
);
112-
// ignore: empty_catches
113-
} catch (e) {}
114-
}
115110

116111
/// Retrieve the size of the store in kibibytes (KiB)
117112
///

prebuiltExampleApplications/AndroidApplication.apk.REMOVED.git-id

Lines changed: 0 additions & 1 deletion
This file was deleted.

prebuiltExampleApplications/WindowsApplication.exe.REMOVED.git-id

Lines changed: 0 additions & 1 deletion
This file was deleted.

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: flutter_map_tile_caching
22
description: Plugin for 'flutter_map' providing advanced caching functionality,
33
with ability to download map regions for offline use.
4-
version: 6.0.0
4+
version: 6.0.1
55
repository: https://github.com/JaffaKetchup/flutter_map_tile_caching
66
issue_tracker: https://github.com/JaffaKetchup/flutter_map_tile_caching/issues
77
documentation: https://fmtc.jaffaketchup.dev
@@ -40,7 +40,7 @@ dependencies:
4040
path_provider: ^2.0.7
4141
permission_handler: ^10.0.0
4242
queue: ^3.1.0+1
43-
share_plus: ^4.0.10
43+
share_plus: ^4.1.0
4444
stream_transform: ^2.0.0
4545
vector_math: ^2.1.2
4646
watcher: ^1.0.1

0 commit comments

Comments
 (0)