mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Enable GMaps on web
There's no reason to disable it on web in the first place
This commit is contained in:
parent
b592c37faf
commit
18f3345b3f
2 changed files with 9 additions and 6 deletions
|
@ -74,11 +74,13 @@ Future<void> init(InitIsolateType isolateType) async {
|
||||||
await _initDiContainer(isolateType);
|
await _initDiContainer(isolateType);
|
||||||
_initVisibilityDetector();
|
_initVisibilityDetector();
|
||||||
|
|
||||||
if (isolateType == InitIsolateType.main) {
|
if (platform_k.isAndroid) {
|
||||||
try {
|
if (isolateType == InitIsolateType.main) {
|
||||||
_isNewGMapsRenderer = await Activity.isNewGMapsRenderer();
|
try {
|
||||||
} catch (e, stackTrace) {
|
_isNewGMapsRenderer = await Activity.isNewGMapsRenderer();
|
||||||
_log.severe("[init] Failed while isNewGMapsRenderer", e, stackTrace);
|
} catch (e, stackTrace) {
|
||||||
|
_log.severe("[init] Failed while isNewGMapsRenderer", e, stackTrace);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import 'package:latlong2/latlong.dart';
|
||||||
import 'package:nc_photos/app_init.dart' as app_init;
|
import 'package:nc_photos/app_init.dart' as app_init;
|
||||||
import 'package:nc_photos/mobile/platform.dart'
|
import 'package:nc_photos/mobile/platform.dart'
|
||||||
if (dart.library.html) 'package:nc_photos/web/platform.dart' as platform;
|
if (dart.library.html) 'package:nc_photos/web/platform.dart' as platform;
|
||||||
|
import 'package:nc_photos/platform/k.dart' as platform_k;
|
||||||
import 'package:nc_photos/pref.dart';
|
import 'package:nc_photos/pref.dart';
|
||||||
import 'package:nc_photos/url_launcher_util.dart';
|
import 'package:nc_photos/url_launcher_util.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
@ -38,7 +39,7 @@ class GpsMap extends StatelessWidget {
|
||||||
build(BuildContext context) {
|
build(BuildContext context) {
|
||||||
if (GpsMapProvider.values[Pref().getGpsMapProviderOr(0)] ==
|
if (GpsMapProvider.values[Pref().getGpsMapProviderOr(0)] ==
|
||||||
GpsMapProvider.osm ||
|
GpsMapProvider.osm ||
|
||||||
!app_init.isNewGMapsRenderer()) {
|
(platform_k.isAndroid && !app_init.isNewGMapsRenderer())) {
|
||||||
return _OsmGpsMap(
|
return _OsmGpsMap(
|
||||||
center: center,
|
center: center,
|
||||||
zoom: zoom,
|
zoom: zoom,
|
||||||
|
|
Loading…
Reference in a new issue