various fixes
This commit is contained in:
parent
f6da334197
commit
abed48e758
6 changed files with 21 additions and 7 deletions
|
@ -272,7 +272,9 @@ object StorageUtils {
|
|||
// content://com.android.externalstorage.documents/tree/primary%3A -> /storage/emulated/0/
|
||||
// content://com.android.externalstorage.documents/tree/10F9-3F13%3APictures -> /storage/10F9-3F13/Pictures/
|
||||
fun convertTreeUriToDirPath(context: Context, treeUri: Uri): String? {
|
||||
val encoded = treeUri.toString().substring(TREE_URI_ROOT.length)
|
||||
val treeUriString = treeUri.toString()
|
||||
if (treeUriString.length <= TREE_URI_ROOT.length) return null
|
||||
val encoded = treeUriString.substring(TREE_URI_ROOT.length)
|
||||
val matcher = TREE_URI_PATH_PATTERN.matcher(Uri.decode(encoded))
|
||||
with(matcher) {
|
||||
if (find()) {
|
||||
|
|
|
@ -21,12 +21,12 @@ import 'package:flutter/widgets.dart';
|
|||
abstract class CollectionFilter extends Equatable implements Comparable<CollectionFilter> {
|
||||
static const List<String> categoryOrder = [
|
||||
QueryFilter.type,
|
||||
FavouriteFilter.type,
|
||||
MimeFilter.type,
|
||||
TypeFilter.type,
|
||||
AlbumFilter.type,
|
||||
TypeFilter.type,
|
||||
LocationFilter.type,
|
||||
CoordinateFilter.type,
|
||||
FavouriteFilter.type,
|
||||
RatingFilter.type,
|
||||
TagFilter.type,
|
||||
PathFilter.type,
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import 'package:aves/model/metadata/enums.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
|
||||
@immutable
|
||||
class DateModifier {
|
||||
class DateModifier extends Equatable {
|
||||
static const writableDateFields = [
|
||||
MetadataField.exifDate,
|
||||
MetadataField.exifDateOriginal,
|
||||
|
@ -18,6 +19,9 @@ class DateModifier {
|
|||
final DateFieldSource? copyFieldSource;
|
||||
final int? shiftMinutes;
|
||||
|
||||
@override
|
||||
List<Object?> get props => [action, fields, setDateTime, copyFieldSource, shiftMinutes];
|
||||
|
||||
const DateModifier._private(
|
||||
this.action,
|
||||
this.fields, {
|
||||
|
|
|
@ -162,6 +162,6 @@ class _BugReportState extends State<BugReport> with FeedbackMixin {
|
|||
}
|
||||
|
||||
Future<void> _goToGithub() async {
|
||||
await launch('${Constants.avesGithub}/issues/new');
|
||||
await launch('${Constants.avesGithub}/issues/new?labels=type%3Abug&template=bug_report.md');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,7 @@ class _EditEntryDateDialogState extends State<EditEntryDateDialog> {
|
|||
if (_action == DateEditAction.setCustom) _buildSetCustomContent(context),
|
||||
if (_action == DateEditAction.copyField) _buildCopyFieldContent(context),
|
||||
if (_action == DateEditAction.shift) _buildShiftContent(context),
|
||||
(_action == DateEditAction.shift || _action == DateEditAction.remove)? _buildDestinationFields(context): const SizedBox(height: 8),
|
||||
(_action == DateEditAction.shift || _action == DateEditAction.remove) ? _buildDestinationFields(context) : const SizedBox(height: 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
@ -11,6 +11,7 @@ class XmpCrsNamespace extends XmpNamespace {
|
|||
static final pbcPattern = RegExp(ns + r':PaintBasedCorrections\[(\d+)\]/(.*)');
|
||||
static final retouchAreasPattern = RegExp(ns + r':RetouchAreas\[(\d+)\]/(.*)');
|
||||
static final lookPattern = RegExp(ns + r':Look/(.*)');
|
||||
static final rmmiPattern = RegExp(ns + r':RangeMaskMapInfo/' + ns + r':RangeMaskMapInfo/(.*)');
|
||||
|
||||
final cgbc = <int, Map<String, String>>{};
|
||||
final gbc = <int, Map<String, String>>{};
|
||||
|
@ -18,12 +19,14 @@ class XmpCrsNamespace extends XmpNamespace {
|
|||
final pbc = <int, Map<String, String>>{};
|
||||
final retouchAreas = <int, Map<String, String>>{};
|
||||
final look = <String, String>{};
|
||||
final rmmi = <String, String>{};
|
||||
|
||||
XmpCrsNamespace(Map<String, String> rawProps) : super(ns, rawProps);
|
||||
|
||||
@override
|
||||
bool extractData(XmpProp prop) {
|
||||
final hasStructs = extractStruct(prop, lookPattern, look);
|
||||
var hasStructs = extractStruct(prop, lookPattern, look);
|
||||
hasStructs |= extractStruct(prop, rmmiPattern, rmmi);
|
||||
var hasIndexedStructs = extractIndexedStruct(prop, cgbcPattern, cgbc);
|
||||
hasIndexedStructs |= extractIndexedStruct(prop, gbcPattern, gbc);
|
||||
hasIndexedStructs |= extractIndexedStruct(prop, mgbcPattern, mgbc);
|
||||
|
@ -59,6 +62,11 @@ class XmpCrsNamespace extends XmpNamespace {
|
|||
title: 'Paint Based Corrections',
|
||||
structByIndex: pbc,
|
||||
),
|
||||
if (rmmi.isNotEmpty)
|
||||
XmpStructCard(
|
||||
title: 'Range Mask Map Info',
|
||||
struct: rmmi,
|
||||
),
|
||||
if (retouchAreas.isNotEmpty)
|
||||
XmpStructArrayCard(
|
||||
title: 'Retouch Areas',
|
||||
|
|
Loading…
Reference in a new issue