minor fixes
This commit is contained in:
parent
56f520b08b
commit
638a41d467
7 changed files with 24 additions and 13 deletions
|
@ -37,12 +37,13 @@
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
android:appCategory="image"
|
||||||
android:fullBackupOnly="true"
|
android:fullBackupOnly="true"
|
||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:requestLegacyExternalStorage="true"
|
android:requestLegacyExternalStorage="true"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
tools:targetApi="lollipop">
|
tools:targetApi="o">
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||||
|
|
|
@ -8,6 +8,7 @@ https://www.adobe.com/devnet-apps/photoshop/fileformatashtml/
|
||||||
https://www.adobe.io/content/dam/udp/en/open/standards/tiff/TIFFphotoshop.pdf
|
https://www.adobe.io/content/dam/udp/en/open/standards/tiff/TIFFphotoshop.pdf
|
||||||
*/
|
*/
|
||||||
object ExifTags {
|
object ExifTags {
|
||||||
|
private const val PROCESSING_SOFTWARE = 0x000b
|
||||||
private const val X_POSITION = 0x011e
|
private const val X_POSITION = 0x011e
|
||||||
private const val Y_POSITION = 0x011f
|
private const val Y_POSITION = 0x011f
|
||||||
private const val T4_OPTIONS = 0x0124
|
private const val T4_OPTIONS = 0x0124
|
||||||
|
@ -29,6 +30,7 @@ object ExifTags {
|
||||||
private const val GDAL_NO_DATA = 0xa481
|
private const val GDAL_NO_DATA = 0xa481
|
||||||
|
|
||||||
private val tagNameMap = hashMapOf(
|
private val tagNameMap = hashMapOf(
|
||||||
|
PROCESSING_SOFTWARE to "Processing Software",
|
||||||
X_POSITION to "X Position",
|
X_POSITION to "X Position",
|
||||||
Y_POSITION to "Y Position",
|
Y_POSITION to "Y Position",
|
||||||
T4_OPTIONS to "T4 Options",
|
T4_OPTIONS to "T4 Options",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.6.10'
|
ext.kotlin_version = '1.6.20'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
|
@ -8,7 +8,7 @@ class TileExtentController {
|
||||||
final String settingsRouteKey;
|
final String settingsRouteKey;
|
||||||
final int columnCountMin, columnCountDefault;
|
final int columnCountMin, columnCountDefault;
|
||||||
final double extentMin, extentMax, spacing, horizontalPadding;
|
final double extentMin, extentMax, spacing, horizontalPadding;
|
||||||
final ValueNotifier<double> extentNotifier = ValueNotifier(0);
|
late final ValueNotifier<double> extentNotifier;
|
||||||
|
|
||||||
late double userPreferredExtent;
|
late double userPreferredExtent;
|
||||||
Size _viewportSize = Size.zero;
|
Size _viewportSize = Size.zero;
|
||||||
|
@ -24,6 +24,7 @@ class TileExtentController {
|
||||||
required this.spacing,
|
required this.spacing,
|
||||||
required this.horizontalPadding,
|
required this.horizontalPadding,
|
||||||
}) {
|
}) {
|
||||||
|
extentNotifier = ValueNotifier(extentMin);
|
||||||
userPreferredExtent = settings.getTileExtent(settingsRouteKey);
|
userPreferredExtent = settings.getTileExtent(settingsRouteKey);
|
||||||
settings.addListener(_onSettingsChanged);
|
settings.addListener(_onSettingsChanged);
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,6 +173,7 @@ class AlbumChipSetActionDelegate extends ChipSetActionDelegate<AlbumFilter> with
|
||||||
final showAction = SnackBarAction(
|
final showAction = SnackBarAction(
|
||||||
label: context.l10n.showButtonLabel,
|
label: context.l10n.showButtonLabel,
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
|
// assume Album page is still the current page when action is triggered
|
||||||
final filter = AlbumFilter(newAlbum, source.getAlbumDisplayName(context, newAlbum));
|
final filter = AlbumFilter(newAlbum, source.getAlbumDisplayName(context, newAlbum));
|
||||||
context.read<HighlightInfo>().trackItem(FilterGridItem(filter, null), highlightItem: filter);
|
context.read<HighlightInfo>().trackItem(FilterGridItem(filter, null), highlightItem: filter);
|
||||||
},
|
},
|
||||||
|
|
|
@ -258,12 +258,15 @@ class EntryActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix
|
||||||
source.resumeMonitoring();
|
source.resumeMonitoring();
|
||||||
source.refreshUris(newUris);
|
source.refreshUris(newUris);
|
||||||
|
|
||||||
|
final l10n = context.l10n;
|
||||||
|
final navigator = Navigator.of(context);
|
||||||
final showAction = isMainMode && newUris.isNotEmpty
|
final showAction = isMainMode && newUris.isNotEmpty
|
||||||
? SnackBarAction(
|
? SnackBarAction(
|
||||||
label: context.l10n.showButtonLabel,
|
label: l10n.showButtonLabel,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pushAndRemoveUntil(
|
// `context` may be obsolete if the user navigated away before triggering the action
|
||||||
context,
|
// so we reused the navigator retrieved before showing the snack bar
|
||||||
|
navigator.pushAndRemoveUntil(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
settings: const RouteSettings(name: CollectionPage.routeName),
|
settings: const RouteSettings(name: CollectionPage.routeName),
|
||||||
builder: (context) => CollectionPage(
|
builder: (context) => CollectionPage(
|
||||||
|
@ -282,13 +285,13 @@ class EntryActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix
|
||||||
final count = selectionCount - successCount;
|
final count = selectionCount - successCount;
|
||||||
showFeedback(
|
showFeedback(
|
||||||
context,
|
context,
|
||||||
context.l10n.collectionExportFailureFeedback(count),
|
l10n.collectionExportFailureFeedback(count),
|
||||||
showAction,
|
showAction,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
showFeedback(
|
showFeedback(
|
||||||
context,
|
context,
|
||||||
context.l10n.genericSuccessFeedback,
|
l10n.genericSuccessFeedback,
|
||||||
showAction,
|
showAction,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,16 +107,19 @@ class VideoActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix
|
||||||
);
|
);
|
||||||
final success = newFields.isNotEmpty;
|
final success = newFields.isNotEmpty;
|
||||||
|
|
||||||
|
final l10n = context.l10n;
|
||||||
if (success) {
|
if (success) {
|
||||||
final _collection = collection;
|
final _collection = collection;
|
||||||
|
final navigator = Navigator.of(context);
|
||||||
final showAction = _collection != null
|
final showAction = _collection != null
|
||||||
? SnackBarAction(
|
? SnackBarAction(
|
||||||
label: context.l10n.showButtonLabel,
|
label: l10n.showButtonLabel,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
final source = _collection.source;
|
final source = _collection.source;
|
||||||
final newUri = newFields['uri'] as String?;
|
final newUri = newFields['uri'] as String?;
|
||||||
Navigator.pushAndRemoveUntil(
|
// `context` may be obsolete if the user navigated away before triggering the action
|
||||||
context,
|
// so we reused the navigator retrieved before showing the snack bar
|
||||||
|
navigator.pushAndRemoveUntil(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
settings: const RouteSettings(name: CollectionPage.routeName),
|
settings: const RouteSettings(name: CollectionPage.routeName),
|
||||||
builder: (context) => CollectionPage(
|
builder: (context) => CollectionPage(
|
||||||
|
@ -130,9 +133,9 @@ class VideoActionDelegate with FeedbackMixin, PermissionAwareMixin, SizeAwareMix
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
showFeedback(context, context.l10n.genericSuccessFeedback, showAction);
|
showFeedback(context, l10n.genericSuccessFeedback, showAction);
|
||||||
} else {
|
} else {
|
||||||
showFeedback(context, context.l10n.genericFailureFeedback);
|
showFeedback(context, l10n.genericFailureFeedback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue