make analytics opt-in, misc fixes
This commit is contained in:
parent
c7aef79f37
commit
dad3dc1921
8 changed files with 11 additions and 13 deletions
|
@ -8,7 +8,7 @@ buildscript {
|
|||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
// TODO TLAD upgrade AGP to 4+ when this lands on stable: https://github.com/flutter/flutter/pull/70808
|
||||
// TODO TLAD upgrade AGP to 4+ when this lands on stable: https://github.com/flutter/flutter/commit/8dd0de7f580972079f610a56a689b0a9c414f81e
|
||||
classpath 'com.android.tools.build:gradle:3.6.4'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
classpath 'com.google.gms:google-services:4.3.5'
|
||||
|
|
|
@ -92,7 +92,7 @@ class Settings extends ChangeNotifier {
|
|||
|
||||
set hasAcceptedTerms(bool newValue) => setAndNotify(hasAcceptedTermsKey, newValue);
|
||||
|
||||
bool get isCrashlyticsEnabled => getBoolOrDefault(isCrashlyticsEnabledKey, true);
|
||||
bool get isCrashlyticsEnabled => getBoolOrDefault(isCrashlyticsEnabledKey, false);
|
||||
|
||||
set isCrashlyticsEnabled(bool newValue) {
|
||||
setAndNotify(isCrashlyticsEnabledKey, newValue);
|
||||
|
|
|
@ -66,7 +66,7 @@ class AvesFilterChip extends StatefulWidget {
|
|||
|
||||
final RenderBox overlay = Overlay.of(context).context.findRenderObject();
|
||||
final touchArea = Size(40, 40);
|
||||
// TODO TLAD show menu within safe area
|
||||
// TODO TLAD check menu is within safe area, when this lands on stable: https://github.com/flutter/flutter/commit/cfc8ec23b633da1001359e384435e8333c9d3733
|
||||
final selectedAction = await showMenu<ChipAction>(
|
||||
context: context,
|
||||
position: RelativeRect.fromRect(tapPosition & touchArea, Offset.zero & overlay.size),
|
||||
|
|
|
@ -52,7 +52,7 @@ class ChipActionDelegate {
|
|||
builder: (context) {
|
||||
return AvesDialog(
|
||||
context: context,
|
||||
content: Text('Matching photos and videos will be hidden from your collection. You can show them again from the “Privacy” settings.\n\nAre you sure that you want to hide this?'),
|
||||
content: Text('Matching photos and videos will be hidden from your collection. You can show them again from the “Privacy” settings.\n\nAre you sure you want to hide them?'),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.pop(context),
|
||||
|
|
|
@ -86,7 +86,7 @@ class FilterNavigationPage<T extends CollectionFilter> extends StatelessWidget {
|
|||
void _showMenu(BuildContext context, T filter, Offset tapPosition) async {
|
||||
final RenderBox overlay = Overlay.of(context).context.findRenderObject();
|
||||
final touchArea = Size(40, 40);
|
||||
// TODO TLAD show menu within safe area
|
||||
// TODO TLAD check menu is within safe area, when this lands on stable: https://github.com/flutter/flutter/commit/cfc8ec23b633da1001359e384435e8333c9d3733
|
||||
final selectedAction = await showMenu<ChipAction>(
|
||||
context: context,
|
||||
position: RelativeRect.fromRect(tapPosition & touchArea, Offset.zero & overlay.size),
|
||||
|
|
|
@ -44,7 +44,8 @@ class InfoRowGroup extends StatefulWidget {
|
|||
|
||||
static const keyValuePadding = 16;
|
||||
static const linkColor = Colors.blue;
|
||||
static final baseStyle = TextStyle(fontSize: 13);
|
||||
static const fontSize = 13.0;
|
||||
static final baseStyle = TextStyle(fontSize: fontSize);
|
||||
static final keyStyle = baseStyle.copyWith(color: Colors.white70, height: 2.0);
|
||||
static final linkStyle = baseStyle.copyWith(color: linkColor, decoration: TextDecoration.underline);
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import 'package:aves/model/settings/map_style.dart';
|
||||
import 'package:aves/model/settings/settings.dart';
|
||||
import 'package:aves/widgets/viewer/info/common.dart';
|
||||
import 'package:aves/widgets/viewer/info/maps/common.dart';
|
||||
import 'package:aves/widgets/viewer/info/maps/scale_layer.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -109,7 +110,7 @@ class _EntryLeafletMapState extends State<EntryLeafletMap> with AutomaticKeepAli
|
|||
Widget _buildAttribution() {
|
||||
switch (widget.style) {
|
||||
case EntryMapStyle.osmHot:
|
||||
return _buildAttributionMarkdown('Map data © [OpenStreetMap](https://www.openstreetmap.org/copyright) contributors, tiles by [Humanitarian OpenStreetMap Team](https://www.hotosm.org/) hosted by [OpenStreetMap France](https://openstreetmap.fr/)');
|
||||
return _buildAttributionMarkdown('Map data © [OpenStreetMap](https://www.openstreetmap.org/copyright) contributors, tiles by [HOT](https://www.hotosm.org/) hosted by [OSM France](https://openstreetmap.fr/)');
|
||||
case EntryMapStyle.stamenToner:
|
||||
case EntryMapStyle.stamenWatercolor:
|
||||
return _buildAttributionMarkdown('Map data © [OpenStreetMap](https://www.openstreetmap.org/copyright) contributors, tiles by [Stamen Design](http://stamen.com), [CC BY 3.0](http://creativecommons.org/licenses/by/3.0)');
|
||||
|
@ -119,15 +120,14 @@ class _EntryLeafletMapState extends State<EntryLeafletMap> with AutomaticKeepAli
|
|||
}
|
||||
|
||||
Widget _buildAttributionMarkdown(String data) {
|
||||
final theme = Theme.of(context);
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 4),
|
||||
child: MarkdownBody(
|
||||
data: data,
|
||||
selectable: true,
|
||||
styleSheet: MarkdownStyleSheet(
|
||||
a: TextStyle(color: theme.accentColor),
|
||||
p: TextStyle(color: Colors.white70, fontSize: theme.textTheme.caption.fontSize),
|
||||
a: TextStyle(color: Theme.of(context).accentColor),
|
||||
p: TextStyle(color: Colors.white70, fontSize: InfoRowGroup.fontSize),
|
||||
),
|
||||
onTapLink: (text, href, title) async {
|
||||
if (await canLaunch(href)) {
|
||||
|
|
|
@ -25,9 +25,6 @@ class _WelcomePageState extends State<WelcomePage> {
|
|||
void initState() {
|
||||
super.initState();
|
||||
_termsLoader = rootBundle.loadString('assets/terms.md');
|
||||
if (!kReleaseMode) {
|
||||
settings.isCrashlyticsEnabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Reference in a new issue