minor fixes

This commit is contained in:
Thibault Deckers 2021-11-30 10:41:04 +09:00
parent e9d7434926
commit 42aad255f1
6 changed files with 30 additions and 23 deletions

View file

@ -72,6 +72,7 @@
"videoActionSettings": "설정",
"entryInfoActionEditDate": "날짜와 시간 수정",
"entryInfoActionEditTags": "태그 수정",
"entryInfoActionRemoveMetadata": "메타데이터 삭제",
"filterFavouriteLabel": "즐겨찾기",
@ -503,6 +504,9 @@
"viewerInfoSearchSuggestionResolution": "해상도",
"viewerInfoSearchSuggestionRights": "권리",
"tagEditorPageTitle": "태그 수정",
"tagEditorPageNewTagFieldLabel": "새 태그",
"tagEditorPageAddTagTooltip": "태그 추가",
"tagEditorSectionRecent": "최근 이용기록",
"panoramaEnableSensorControl": "센서 제어 활성화",

View file

@ -424,6 +424,9 @@
"settingsAllowErrorReporting": "Разрешить анонимную отправку логов",
"settingsSaveSearchHistory": "Сохранять историю поиска",
"settingsHiddenItemsTile": "Скрытые объекты",
"settingsHiddenItemsTitle": "Скрытые объекты",
"settingsHiddenFiltersTitle": "Скрытые фильтры",
"settingsHiddenFiltersBanner": "Фотографии и видео, соответствующие скрытым фильтрам, не появятся в вашей коллекции.",
"settingsHiddenFiltersEmpty": "Нет скрытых фильтров",

View file

@ -66,7 +66,9 @@ class AlbumFilter extends CollectionFilter {
return PaletteGenerator.fromImageProvider(
AppIconImage(packageName: packageName, size: 24),
).then((palette) async {
final color = palette.dominantColor?.color ?? (await super.color(context));
// `dominantColor` is most representative but can have low contrast with a dark background
// `vibrantColor` is usually representative and has good contrast with a dark background
final color = palette.vibrantColor?.color ?? (await super.color(context));
_appColors[album] = color;
return color;
});

View file

@ -81,7 +81,9 @@ class VideoMetadataFormatter {
static Future<CatalogMetadata?> getCatalogMetadata(AvesEntry entry) async {
final mediaInfo = await getVideoMetadata(entry);
bool isDefined(dynamic value) => value is String && value != '0';
// only consider values with at least 8 characters (yyyymmdd),
// ignoring unset values like `0`, as well as year values like `2021`
bool isDefined(dynamic value) => value is String && value.length >= 8;
var dateString = mediaInfo[Keys.date];
if (!isDefined(dateString)) {
@ -112,6 +114,7 @@ class VideoMetadataFormatter {
// `DateTime` does not recognize:
// - `UTC 2021-05-30 19:14:21`
// - `2021`
final match = _anotherDatePattern.firstMatch(dateString);
if (match != null) {

View file

@ -12,7 +12,6 @@ import 'package:aves/model/source/tag.dart';
import 'package:aves/theme/durations.dart';
import 'package:aves/theme/icons.dart';
import 'package:aves/utils/android_file_utils.dart';
import 'package:aves/utils/color_utils.dart';
import 'package:aves/utils/constants.dart';
import 'package:aves/widgets/common/identity/aves_filter_chip.dart';
import 'package:aves/widgets/common/thumbnail/image.dart';
@ -118,17 +117,22 @@ class CoveredFilterChip<T extends CollectionFilter> extends StatelessWidget {
);
},
child: entry == null
? Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.white,
stringToColor(filter.getLabel(context)),
],
),
),
? FutureBuilder<Color>(
future: filter.color(context),
builder: (context, snapshot) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.white,
snapshot.data ?? Colors.white,
],
),
),
);
},
)
: ThumbnailImage(
entry: entry,

View file

@ -1,17 +1,8 @@
{
"ko": [
"entryInfoActionEditTags",
"tagEditorPageTitle",
"tagEditorPageNewTagFieldLabel",
"tagEditorPageAddTagTooltip"
],
"ru": [
"resetButtonTooltip",
"entryInfoActionEditTags",
"settingsViewerMaximumBrightness",
"settingsHiddenItemsTile",
"settingsHiddenItemsTitle",
"tagEditorPageTitle",
"tagEditorPageNewTagFieldLabel",
"tagEditorPageAddTagTooltip"