viewer: catalog/locate on launch
This commit is contained in:
parent
ad04967464
commit
730c8bd632
2 changed files with 9 additions and 3 deletions
|
@ -85,6 +85,9 @@ class _HomePageState extends State<HomePage> {
|
||||||
final sharedExtra = await ViewerService.getSharedEntry();
|
final sharedExtra = await ViewerService.getSharedEntry();
|
||||||
if (sharedExtra != null) {
|
if (sharedExtra != null) {
|
||||||
_sharedEntry = await ImageFileService.getImageEntry(sharedExtra['uri'], sharedExtra['mimeType']);
|
_sharedEntry = await ImageFileService.getImageEntry(sharedExtra['uri'], sharedExtra['mimeType']);
|
||||||
|
// cataloging is essential for geolocation and video rotation
|
||||||
|
await _sharedEntry.catalog();
|
||||||
|
unawaited(_sharedEntry.locate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ class _FullscreenBottomOverlayContent extends StatelessWidget {
|
||||||
Container(
|
Container(
|
||||||
padding: const EdgeInsets.only(top: _interRowPadding),
|
padding: const EdgeInsets.only(top: _interRowPadding),
|
||||||
width: subRowWidth,
|
width: subRowWidth,
|
||||||
child: _LocationRow(entry),
|
child: _LocationRow(entry: entry),
|
||||||
),
|
),
|
||||||
if (twoColumns)
|
if (twoColumns)
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -190,10 +190,13 @@ class _FullscreenBottomOverlayContent extends StatelessWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class _LocationRow extends StatelessWidget {
|
class _LocationRow extends AnimatedWidget {
|
||||||
final ImageEntry entry;
|
final ImageEntry entry;
|
||||||
|
|
||||||
const _LocationRow(this.entry);
|
_LocationRow({
|
||||||
|
Key key,
|
||||||
|
this.entry,
|
||||||
|
}) : super(key: key, listenable: entry.addressChangeNotifier);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
Loading…
Reference in a new issue