1
0
mirror of https://github.com/go-vikunja/app synced 2025-01-26 01:26:04 +00:00

Minor fixes; Added signing config for Android

This commit is contained in:
Aleksandr Borisenko 2021-03-19 18:13:38 +03:00
parent 59d5907b29
commit 50e17b045a
6 changed files with 48 additions and 26 deletions

View File

@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 30
@ -44,6 +50,15 @@ android {
versionName flutterVersionName
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
flavorDimensions "deploy"
//productFlavors {
@ -69,6 +84,9 @@ android {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
}
debug {
signingConfig signingConfigs.debug
}
}

View File

@ -9,8 +9,7 @@ class TaskTile extends StatefulWidget {
final VoidCallback onEdit;
final bool loading;
const TaskTile(
{Key key, @required this.task, this.onEdit, this.loading = false})
const TaskTile({Key key, @required this.task, this.onEdit, this.loading = false})
: assert(task != null),
super(key: key);
@ -42,27 +41,26 @@ class TaskTileState extends State<TaskTile> {
)),
),
title: Text(_currentTask.title),
subtitle:
_currentTask.description == null || _currentTask.description.isEmpty
? null
: Text(_currentTask.description),
subtitle: _currentTask.description == null || _currentTask.description.isEmpty
? null
: Text(_currentTask.description),
trailing: IconButton(
icon: Icon(Icons.settings),
onPressed: () {
null; // TODO: implement edit task
}),
icon: Icon(Icons.settings),
onPressed: () {}, // TODO: implement edit task
),
);
}
return CheckboxListTile(
title: Text(_currentTask.title),
controlAffinity: ListTileControlAffinity.leading,
value: _currentTask.done ?? false,
subtitle:
_currentTask.description == null || _currentTask.description.isEmpty
? null
: Text(_currentTask.description),
secondary:
IconButton(icon: Icon(Icons.settings), onPressed: widget.onEdit),
subtitle: _currentTask.description == null || _currentTask.description.isEmpty
? null
: Text(_currentTask.description),
secondary: IconButton(
icon: Icon(Icons.settings),
onPressed: widget.onEdit,
),
onChanged: _change,
);
}
@ -80,13 +78,15 @@ class TaskTileState extends State<TaskTile> {
Future<Task> _updateTask(Task task, bool checked) {
// TODO use copyFrom
return VikunjaGlobal.of(context).taskService.update(Task(
return VikunjaGlobal.of(context).taskService.update(
Task(
id: task.id,
done: checked,
title: task.title,
description: task.description,
owner: null,
));
)
);
}
}

View File

@ -27,12 +27,11 @@ class Task {
reminders = (json['reminder_dates'] as List<dynamic>)
?.map((r) => DateTime.parse(r))
?.toList(),
due =
json['due_date'] != null ? DateTime.parse(json['due_date']) : null,
due = json['due_date'] != null ? DateTime.parse(json['due_date']) : null,
description = json['description'],
title = json['title'],
done = json['done'],
owner = User.fromJson(json['created_by']);
owner = json['created_by'] != null ? User.fromJson(json['created_by']) : null;
toJSON() => {
'id': id,

View File

@ -32,19 +32,24 @@ class HomePageState extends State<HomePage> with AfterLayoutMixin<HomePage> {
Widget _namespacesWidget() {
List<Widget> namespacesList = <Widget>[];
_namespaces.asMap().forEach((i, namespace) => namespacesList.add(ListTile(
_namespaces.asMap().forEach((i, namespace) => namespacesList.add(
ListTile(
leading: const Icon(Icons.folder),
title: Text(namespace.title),
selected: i == _selectedDrawerIndex,
onTap: () => _onSelectItem(i),
)));
)
));
return this._loading
? Center(child: CircularProgressIndicator())
: RefreshIndicator(
child: ListView(
padding: EdgeInsets.zero,
children: ListTile.divideTiles(context: context, tiles: namespacesList).toList()),
children: ListTile.divideTiles(
context: context,
tiles: namespacesList).toList(),
),
onRefresh: _loadNamespaces,
);
}

View File

@ -26,7 +26,7 @@ class _NamespacePageState extends State<NamespacePage>
@override
void afterFirstLayout(BuildContext context) {
_loadLists();
//_loadLists(); // NOTE: goes right after didChangeDependencies
}
/////

View File

@ -117,7 +117,7 @@ class _NamespaceEditPageState extends State<NamespaceEditPage> {
content: Text('Something went wrong: ' + err.toString()),
action: SnackBarAction(
label: 'CLOSE',
onPressed: Scaffold.of(context).hideCurrentSnackBar),
onPressed: ScaffoldMessenger.of(context).hideCurrentSnackBar),
),
);
});