mirror of
https://github.com/go-vikunja/app
synced 2024-06-06 04:29:47 +00:00
respects landing page filter
This commit is contained in:
parent
f91509502a
commit
515be2e88f
|
@ -226,9 +226,19 @@ class LandingPageState extends State<LandingPage>
|
||||||
.settingsManager
|
.settingsManager
|
||||||
.getLandingPageOnlyDueDateTasks()
|
.getLandingPageOnlyDueDateTasks()
|
||||||
.then((showOnlyDueDateTasks) {
|
.then((showOnlyDueDateTasks) {
|
||||||
return VikunjaGlobal
|
|
||||||
.of(context)
|
VikunjaGlobalState global = VikunjaGlobal.of(context);
|
||||||
.taskService
|
Map<String, dynamic>? frontend_settings = global.currentUser?.settings?.frontend_settings;
|
||||||
|
int? filterId = 0;
|
||||||
|
if(frontend_settings != null) {
|
||||||
|
if(frontend_settings["filter_id_used_on_overview"] != null)
|
||||||
|
filterId = frontend_settings["filter_id_used_on_overview"];
|
||||||
|
}
|
||||||
|
if(filterId != null && filterId != 0) {
|
||||||
|
return global.taskService.getAllByProject(filterId).then<Future<void>?>((response) => _handleTaskList(response?.body, showOnlyDueDateTasks));;
|
||||||
|
}
|
||||||
|
|
||||||
|
return global.taskService
|
||||||
.getByOptions(TaskServiceOptions(
|
.getByOptions(TaskServiceOptions(
|
||||||
newOptions: [
|
newOptions: [
|
||||||
TaskServiceOption<TaskServiceOptionSortBy>("sort_by", ["due_date", "id"]),
|
TaskServiceOption<TaskServiceOptionSortBy>("sort_by", ["due_date", "id"]),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user