Skip to content

Commit

Permalink
feat(wip): task editing and info
Browse files Browse the repository at this point in the history
  • Loading branch information
orl0pl committed Nov 4, 2024
1 parent d12d57d commit 7cb8bf5
Show file tree
Hide file tree
Showing 7 changed files with 397 additions and 117 deletions.
10 changes: 10 additions & 0 deletions lib/data/database_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,16 @@ class DatabaseHelper {
});
}

Future<List<String>> getTaskAttachments(int taskId) async {
Database db = await database;
List<Map<String, dynamic>> maps = await db.query(
'TaskAttachment',
where: 'taskId = ?',
whereArgs: [taskId],
);
return maps.map((e) => e['data'].toString()).toList();
}

void updateTaskAttachments(int taskId, List<String> data) async {
Database db = await database;
db.transaction((txn) async {
Expand Down
11 changes: 11 additions & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,17 @@
"audio": "Audio",
"document": "Document",
"other": "Other",
"mark_as_done": "Mark as done",
"mark_as_not_done": "Mark as not done",
"@attachment_not_picked": {},
"@change_attachment": {},
"@image": {},
"@video": {},
"@audio": {},
"@document": {},
"@other": {},
"@mark_as_done": {},
"@mark_as_not_done": {},
"@pick_attachment": {},
"@add_attachment": {}
}
2 changes: 2 additions & 0 deletions lib/screens/add_redesgin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@ class _AddScreenState extends State<AddScreen> {
selectedTagsIds: selectedNoteTagsIds,
noteDraft: noteDraft,
tags: _noteTags,
updateAttachments: updateAttachments,
attachments: attachments,
)
: null,
),
Expand Down
1 change: 0 additions & 1 deletion lib/screens/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import 'package:android_package_manager/android_package_manager.dart';
import 'package:app_launcher/app_launcher.dart';

import 'package:flutter/material.dart';
import 'package:maximum/screens/error.dart';
import 'package:maximum/screens/notes.dart';
import 'package:maximum/screens/timeline.dart';
import 'package:maximum/widgets/main_screen/bottom.dart';
Expand Down
Loading

0 comments on commit 7cb8bf5

Please sign in to comment.