#414 search: missing address filter
This commit is contained in:
parent
e30efc7ddf
commit
638ddd0a21
5 changed files with 56 additions and 0 deletions
|
@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
|
|||
### Added
|
||||
|
||||
- Viewer: long press on rating quick action for quicker rating
|
||||
- Search: missing address filter
|
||||
- Lithuanian translation (thanks Gediminas Murauskas)
|
||||
|
||||
### Changed
|
||||
|
|
|
@ -127,6 +127,7 @@
|
|||
"filterBinLabel": "Recycle bin",
|
||||
"filterFavouriteLabel": "Favorite",
|
||||
"filterNoDateLabel": "Undated",
|
||||
"filterNoAddressLabel": "No address",
|
||||
"filterNoLocationLabel": "Unlocated",
|
||||
"filterNoRatingLabel": "Unrated",
|
||||
"filterNoTagLabel": "Untagged",
|
||||
|
|
|
@ -7,6 +7,7 @@ class MissingFilter extends CollectionFilter {
|
|||
static const type = 'missing';
|
||||
|
||||
static const _date = 'date';
|
||||
static const _fineAddress = 'fine_address';
|
||||
static const _title = 'title';
|
||||
|
||||
final String metadataType;
|
||||
|
@ -14,6 +15,7 @@ class MissingFilter extends CollectionFilter {
|
|||
late final EntryFilter _test;
|
||||
|
||||
static final date = MissingFilter._private(_date);
|
||||
static final fineAddress = MissingFilter._private(_fineAddress);
|
||||
static final title = MissingFilter._private(_title);
|
||||
|
||||
@override
|
||||
|
@ -25,6 +27,10 @@ class MissingFilter extends CollectionFilter {
|
|||
_test = (entry) => (entry.catalogMetadata?.dateMillis ?? 0) == 0;
|
||||
_icon = AIcons.dateUndated;
|
||||
break;
|
||||
case _fineAddress:
|
||||
_test = (entry) => entry.hasGps && !entry.hasFineAddress;
|
||||
_icon = AIcons.locationUnlocated;
|
||||
break;
|
||||
case _title:
|
||||
_test = (entry) => (entry.catalogMetadata?.xmpTitle ?? '').isEmpty;
|
||||
_icon = AIcons.descriptionUntitled;
|
||||
|
@ -60,6 +66,8 @@ class MissingFilter extends CollectionFilter {
|
|||
switch (metadataType) {
|
||||
case _date:
|
||||
return context.l10n.filterNoDateLabel;
|
||||
case _fineAddress:
|
||||
return context.l10n.filterNoAddressLabel;
|
||||
case _title:
|
||||
return context.l10n.filterNoTitleLabel;
|
||||
default:
|
||||
|
|
|
@ -227,6 +227,7 @@ class CollectionSearchDelegate extends AvesSearchDelegate {
|
|||
filters: [
|
||||
MissingFilter.date,
|
||||
LocationFilter(LocationLevel.place, ''),
|
||||
MissingFilter.fineAddress,
|
||||
TagFilter(''),
|
||||
RatingFilter(0),
|
||||
MissingFilter.title,
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
"filterBinLabel",
|
||||
"filterFavouriteLabel",
|
||||
"filterNoDateLabel",
|
||||
"filterNoAddressLabel",
|
||||
"filterNoLocationLabel",
|
||||
"filterNoRatingLabel",
|
||||
"filterNoTagLabel",
|
||||
|
@ -590,6 +591,7 @@
|
|||
],
|
||||
|
||||
"de": [
|
||||
"filterNoAddressLabel",
|
||||
"subtitlePositionTop",
|
||||
"subtitlePositionBottom",
|
||||
"widgetDisplayedItemRandom",
|
||||
|
@ -599,6 +601,14 @@
|
|||
"settingsWidgetDisplayedItem"
|
||||
],
|
||||
|
||||
"el": [
|
||||
"filterNoAddressLabel"
|
||||
],
|
||||
|
||||
"es": [
|
||||
"filterNoAddressLabel"
|
||||
],
|
||||
|
||||
"fa": [
|
||||
"appName",
|
||||
"welcomeMessage",
|
||||
|
@ -689,6 +699,7 @@
|
|||
"filterBinLabel",
|
||||
"filterFavouriteLabel",
|
||||
"filterNoDateLabel",
|
||||
"filterNoAddressLabel",
|
||||
"filterNoLocationLabel",
|
||||
"filterNoRatingLabel",
|
||||
"filterNoTagLabel",
|
||||
|
@ -1189,8 +1200,13 @@
|
|||
"filePickerUseThisFolder"
|
||||
],
|
||||
|
||||
"fr": [
|
||||
"filterNoAddressLabel"
|
||||
],
|
||||
|
||||
"gl": [
|
||||
"entryInfoActionExportMetadata",
|
||||
"filterNoAddressLabel",
|
||||
"accessibilityAnimationsRemove",
|
||||
"accessibilityAnimationsKeep",
|
||||
"displayRefreshRatePreferHighest",
|
||||
|
@ -1648,6 +1664,7 @@
|
|||
|
||||
"id": [
|
||||
"entryInfoActionExportMetadata",
|
||||
"filterNoAddressLabel",
|
||||
"subtitlePositionTop",
|
||||
"subtitlePositionBottom",
|
||||
"widgetDisplayedItemRandom",
|
||||
|
@ -1657,9 +1674,14 @@
|
|||
"settingsWidgetDisplayedItem"
|
||||
],
|
||||
|
||||
"it": [
|
||||
"filterNoAddressLabel"
|
||||
],
|
||||
|
||||
"ja": [
|
||||
"chipActionFilterIn",
|
||||
"entryInfoActionExportMetadata",
|
||||
"filterNoAddressLabel",
|
||||
"subtitlePositionTop",
|
||||
"subtitlePositionBottom",
|
||||
"widgetDisplayedItemRandom",
|
||||
|
@ -1669,11 +1691,20 @@
|
|||
"settingsWidgetDisplayedItem"
|
||||
],
|
||||
|
||||
"ko": [
|
||||
"filterNoAddressLabel"
|
||||
],
|
||||
|
||||
"lt": [
|
||||
"filterNoAddressLabel"
|
||||
],
|
||||
|
||||
"nb": [
|
||||
"videoActionCaptureFrame",
|
||||
"videoActionSelectStreams",
|
||||
"entryInfoActionEditLocation",
|
||||
"entryInfoActionExportMetadata",
|
||||
"filterNoAddressLabel",
|
||||
"coordinateFormatDms",
|
||||
"mapStyleHuaweiNormal",
|
||||
"mapStyleHuaweiTerrain",
|
||||
|
@ -1792,6 +1823,7 @@
|
|||
|
||||
"nl": [
|
||||
"entryInfoActionExportMetadata",
|
||||
"filterNoAddressLabel",
|
||||
"subtitlePositionTop",
|
||||
"subtitlePositionBottom",
|
||||
"widgetDisplayedItemRandom",
|
||||
|
@ -1808,6 +1840,7 @@
|
|||
"timeDays",
|
||||
"focalLength",
|
||||
"entryInfoActionExportMetadata",
|
||||
"filterNoAddressLabel",
|
||||
"filterTypeRawLabel",
|
||||
"filterTypeSphericalVideoLabel",
|
||||
"filterTypeGeotiffLabel",
|
||||
|
@ -2300,6 +2333,7 @@
|
|||
|
||||
"pt": [
|
||||
"entryInfoActionExportMetadata",
|
||||
"filterNoAddressLabel",
|
||||
"subtitlePositionTop",
|
||||
"subtitlePositionBottom",
|
||||
"widgetDisplayedItemRandom",
|
||||
|
@ -2309,6 +2343,14 @@
|
|||
"settingsWidgetDisplayedItem"
|
||||
],
|
||||
|
||||
"ro": [
|
||||
"filterNoAddressLabel"
|
||||
],
|
||||
|
||||
"ru": [
|
||||
"filterNoAddressLabel"
|
||||
],
|
||||
|
||||
"th": [
|
||||
"itemCount",
|
||||
"timeSeconds",
|
||||
|
@ -2318,6 +2360,7 @@
|
|||
"applyButtonLabel",
|
||||
"entryActionShowGeoTiffOnMap",
|
||||
"videoActionCaptureFrame",
|
||||
"filterNoAddressLabel",
|
||||
"coordinateDms",
|
||||
"keepScreenOnViewerOnly",
|
||||
"accessibilityAnimationsRemove",
|
||||
|
@ -2681,6 +2724,7 @@
|
|||
|
||||
"tr": [
|
||||
"entryInfoActionExportMetadata",
|
||||
"filterNoAddressLabel",
|
||||
"subtitlePositionTop",
|
||||
"subtitlePositionBottom",
|
||||
"widgetDisplayedItemRandom",
|
||||
|
@ -2691,6 +2735,7 @@
|
|||
],
|
||||
|
||||
"zh": [
|
||||
"filterNoAddressLabel",
|
||||
"aboutLicensesFlutterPackagesSectionTitle",
|
||||
"aboutLicensesDartPackagesSectionTitle"
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue