minor fixes
This commit is contained in:
parent
930ca0e1f0
commit
a3543a7c69
5 changed files with 78 additions and 61 deletions
|
@ -289,7 +289,7 @@ class ImageEntry {
|
|||
);
|
||||
}
|
||||
} catch (exception, stack) {
|
||||
debugPrint('$runtimeType addAddressToMetadata failed with path=$path coordinates=$coordinates exception=$exception\n$stack');
|
||||
debugPrint('$runtimeType locate failed with path=$path coordinates=$coordinates exception=$exception\n$stack');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,53 +36,59 @@ class _CreateAlbumDialogState extends State<CreateAlbumDialog> {
|
|||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text('New Album'),
|
||||
content: ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
if (_allVolumes.length > 1) ...[
|
||||
content: Container(
|
||||
// workaround because the dialog tries
|
||||
// to size itself to the content intrinsic size,
|
||||
// but the `ListView` viewport does not have one
|
||||
width: double.maxFinite,
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
if (_allVolumes.length > 1) ...[
|
||||
Padding(
|
||||
padding: Constants.dialogContentHorizontalPadding,
|
||||
child: Text('Storage:'),
|
||||
),
|
||||
..._allVolumes.map((volume) => RadioListTile<StorageVolume>(
|
||||
value: volume,
|
||||
groupValue: _selectedVolume,
|
||||
onChanged: (volume) {
|
||||
_selectedVolume = volume;
|
||||
_checkAlbumExists();
|
||||
setState(() {});
|
||||
},
|
||||
title: Text(
|
||||
volume.description,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.fade,
|
||||
maxLines: 1,
|
||||
),
|
||||
subtitle: Text(
|
||||
volume.path,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.fade,
|
||||
maxLines: 1,
|
||||
),
|
||||
)),
|
||||
SizedBox(height: 8),
|
||||
],
|
||||
Padding(
|
||||
padding: Constants.dialogContentHorizontalPadding,
|
||||
child: Text('Storage:'),
|
||||
child: ValueListenableBuilder<bool>(
|
||||
valueListenable: _existsNotifier,
|
||||
builder: (context, exists, child) {
|
||||
return TextField(
|
||||
controller: _nameController,
|
||||
decoration: InputDecoration(
|
||||
helperText: exists ? 'Album already exists' : '',
|
||||
),
|
||||
onChanged: (_) => _checkAlbumExists(),
|
||||
onSubmitted: (_) => _submit(context),
|
||||
);
|
||||
}),
|
||||
),
|
||||
..._allVolumes.map((volume) => RadioListTile<StorageVolume>(
|
||||
value: volume,
|
||||
groupValue: _selectedVolume,
|
||||
onChanged: (volume) {
|
||||
_selectedVolume = volume;
|
||||
_checkAlbumExists();
|
||||
setState(() {});
|
||||
},
|
||||
title: Text(
|
||||
volume.description,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.fade,
|
||||
maxLines: 1,
|
||||
),
|
||||
subtitle: Text(
|
||||
volume.path,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.fade,
|
||||
maxLines: 1,
|
||||
),
|
||||
)),
|
||||
SizedBox(height: 8),
|
||||
],
|
||||
Padding(
|
||||
padding: Constants.dialogContentHorizontalPadding,
|
||||
child: ValueListenableBuilder<bool>(
|
||||
valueListenable: _existsNotifier,
|
||||
builder: (context, exists, child) {
|
||||
return TextField(
|
||||
controller: _nameController,
|
||||
decoration: InputDecoration(
|
||||
helperText: exists ? 'Album already exists' : '',
|
||||
),
|
||||
onChanged: (_) => _checkAlbumExists(),
|
||||
onSubmitted: (_) => _submit(context),
|
||||
);
|
||||
}),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
contentPadding: EdgeInsets.only(top: 20),
|
||||
actions: [
|
||||
|
|
|
@ -22,14 +22,20 @@ class _GroupCollectionDialogState extends State<GroupCollectionDialog> {
|
|||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text('Group'),
|
||||
content: ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
_buildRadioListTile(GroupFactor.album, 'By album'),
|
||||
_buildRadioListTile(GroupFactor.month, 'By month'),
|
||||
_buildRadioListTile(GroupFactor.day, 'By day'),
|
||||
_buildRadioListTile(GroupFactor.none, 'Do not group'),
|
||||
],
|
||||
content: Container(
|
||||
// workaround because the dialog tries
|
||||
// to size itself to the content intrinsic size,
|
||||
// but the `ListView` viewport does not have one
|
||||
width: double.maxFinite,
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
_buildRadioListTile(GroupFactor.album, 'By album'),
|
||||
_buildRadioListTile(GroupFactor.month, 'By month'),
|
||||
_buildRadioListTile(GroupFactor.day, 'By day'),
|
||||
_buildRadioListTile(GroupFactor.none, 'Do not group'),
|
||||
],
|
||||
),
|
||||
),
|
||||
contentPadding: EdgeInsets.only(top: 20),
|
||||
actions: [
|
||||
|
|
|
@ -22,13 +22,19 @@ class _SortCollectionDialogState extends State<SortCollectionDialog> {
|
|||
Widget build(BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Text('Sort'),
|
||||
content: ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
_buildRadioListTile(SortFactor.date, 'By date'),
|
||||
_buildRadioListTile(SortFactor.size, 'By size'),
|
||||
_buildRadioListTile(SortFactor.name, 'By album & file name'),
|
||||
],
|
||||
content: Container(
|
||||
// workaround because the dialog tries
|
||||
// to size itself to the content intrinsic size,
|
||||
// but the `ListView` viewport does not have one
|
||||
width: double.maxFinite,
|
||||
child: ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
_buildRadioListTile(SortFactor.date, 'By date'),
|
||||
_buildRadioListTile(SortFactor.size, 'By size'),
|
||||
_buildRadioListTile(SortFactor.name, 'By album & file name'),
|
||||
],
|
||||
),
|
||||
),
|
||||
contentPadding: EdgeInsets.only(top: 20),
|
||||
actions: [
|
||||
|
|
|
@ -140,8 +140,7 @@ class _WelcomePageState extends State<WelcomePage> {
|
|||
borderRadius: BorderRadius.circular(16),
|
||||
child: Markdown(
|
||||
data: terms,
|
||||
// TODO TLAD make it selectable when this fix (in 1.18.0-6.0.pre) lands on stable: https://github.com/flutter/flutter/pull/54479
|
||||
selectable: false,
|
||||
selectable: true,
|
||||
onTapLink: (url) async {
|
||||
if (await canLaunch(url)) {
|
||||
await launch(url);
|
||||
|
|
Loading…
Reference in a new issue