-
-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use filepaths as cache keys, not File objects (#1128)
* Fix of asset caches: 1. AssetCache - key is set to File.path because File incorrectly checks for presence in cache 2. OrderedAssetCache - in add function is sometimes set index of asset to -1 even if it is the same as already stored. So additional check is implemented to return asset. * Added bool EnabledRemove to AssetCache. Setting it to false during Saving of note in Editor blocks possible call of PdfImageEditor.loadOut Call of PdfImageEditor.loadOut during saving the note (for example during automatic save) removes background pdf from AssetCache and causes problems with missing assets in saved file. This solves issue #1066 * fix: add collection to pubspec * chore: formatting and misc changes * fix: only remove cache item if not used in another image --------- Co-authored-by: Adil Hanney <adilh+github@orchid.anonaddy.com>
- Loading branch information
Showing
4 changed files
with
56 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,6 +143,8 @@ dependencies: | |
|
||
mutex: ^3.1.0 | ||
|
||
collection: ^1.0.0 | ||
|
||
dev_dependencies: | ||
flutter_test: | ||
sdk: flutter | ||
|