Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v9.1.4: fixed comparison bug in removeTilesOlderThan #173

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ Many thanks to my sponsors, no matter how much or how little they donated. Spons

# Changelog

## [9.1.4] - 2024/12/05

* Fixed bug in `removeTilesOlderThan` where actually tiles newer than the specified expiry were being removed ([#172](https://github.com/JaffaKetchup/flutter_map_tile_caching/issues/172))

## [9.1.3] - 2024/08/19

* Fixed bug where any operation that attempted to delete tiles fatally crashed on some iOS devices
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: The example application for 'flutter_map_tile_caching', showcasing
it's functionality and use-cases.
publish_to: "none"

version: 9.1.3
version: 9.1.4

environment:
sdk: ">=3.3.0 <4.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ Future<void> _worker(
.build();
final tilesQuery = (root.box<ObjectBoxTile>().query(
ObjectBoxTile_.lastModified
.greaterThan(expiry.millisecondsSinceEpoch),
.lessThan(expiry.millisecondsSinceEpoch),
)..linkMany(
ObjectBoxTile_.stores,
ObjectBoxStore_.name.equals(storeName),
Expand Down
10 changes: 9 additions & 1 deletion lib/src/backend/interfaces/backend/internal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,15 @@ abstract interface class FMTCBackendInternal
});

/// {@template fmtc.backend.removeTilesOlderThan}
/// Remove tiles that were last modified after expiry from the specified store
/// Remove tiles that were last modified prior to the expiry timestamp from
/// the specified store
///
/// For example, to remove tiles last modified over 14 days ago, calculate
/// [expiry] with:
///
/// ```dart
/// expiry: DateTime.timestamp().subtract(const Duration(days: 14))
/// ```
///
/// Returns the number of tiles that were actually deleted (they were
/// orphaned). See [deleteTile] for more information about orphan tiles.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: flutter_map_tile_caching
description: Plugin for 'flutter_map' providing advanced caching functionality,
with ability to download map regions for offline use.
version: 9.1.3
version: 9.1.4

repository: https://github.com/JaffaKetchup/flutter_map_tile_caching
issue_tracker: https://github.com/JaffaKetchup/flutter_map_tile_caching/issues
Expand Down
2 changes: 1 addition & 1 deletion windowsApplicationInstallerSetup.iss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; Script generated by the Inno Setup Script Wizard

#define MyAppName "FMTC Demo"
#define MyAppVersion "for 9.1.3"
#define MyAppVersion "for 9.1.4"
#define MyAppPublisher "JaffaKetchup Development"
#define MyAppURL "https://github.com/JaffaKetchup/flutter_map_tile_caching"
#define MyAppSupportURL "https://github.com/JaffaKetchup/flutter_map_tile_caching/issues"
Expand Down
Loading