From e2cb1c74bcd14faf00a44784fedb1bd08ed86886 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Tue, 14 Apr 2020 14:45:28 -0500 Subject: [PATCH] Update hiding widget due date --- .../org/tasks/preferences/fragments/ScrollableWidget.kt | 7 +++---- .../java/org/tasks/widget/ScrollableViewsFactory.java | 1 + app/src/main/res/xml/preferences_widget.xml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/tasks/preferences/fragments/ScrollableWidget.kt b/app/src/main/java/org/tasks/preferences/fragments/ScrollableWidget.kt index d2c522cfe..e48a24d18 100644 --- a/app/src/main/java/org/tasks/preferences/fragments/ScrollableWidget.kt +++ b/app/src/main/java/org/tasks/preferences/fragments/ScrollableWidget.kt @@ -62,13 +62,12 @@ class ScrollableWidget : InjectingPreferenceFragment() { setupSlider(R.string.p_widget_opacity, 100) setupSlider(R.string.p_widget_font_size, 16) - setupCheckbox(R.string.p_widget_show_due_date) + val showDueDate = setupCheckbox(R.string.p_widget_show_due_date) + setupCheckbox(R.string.p_widget_due_date_underneath, false).dependency = showDueDate.key setupCheckbox(R.string.p_widget_show_checkboxes) - setupCheckbox(R.string.p_widget_due_date_underneath, false) setupCheckbox(R.string.p_widget_show_full_task_title, false) val showDescription = setupCheckbox(R.string.p_widget_show_description, true) - val showFullDescription = setupCheckbox(R.string.p_widget_show_full_description, false) - showFullDescription.dependency = showDescription.key + setupCheckbox(R.string.p_widget_show_full_description, false).dependency = showDescription.key setupList(R.string.p_widget_spacing) val showHeader = setupCheckbox(R.string.p_widget_show_header) val showSettings = setupCheckbox(R.string.p_widget_show_settings) diff --git a/app/src/main/java/org/tasks/widget/ScrollableViewsFactory.java b/app/src/main/java/org/tasks/widget/ScrollableViewsFactory.java index 545a3da8a..45a1f0b27 100644 --- a/app/src/main/java/org/tasks/widget/ScrollableViewsFactory.java +++ b/app/src/main/java/org/tasks/widget/ScrollableViewsFactory.java @@ -157,6 +157,7 @@ class ScrollableViewsFactory implements RemoteViewsService.RemoteViewsFactory { formatDueDate(row, task); } else { row.setViewVisibility(R.id.widget_due_bottom, View.GONE); + row.setViewVisibility(R.id.widget_due_end, View.GONE); if (task.hasDueDate() && task.isOverdue()) { textColorTitle = getColor(context, R.color.overdue); } diff --git a/app/src/main/res/xml/preferences_widget.xml b/app/src/main/res/xml/preferences_widget.xml index 4a229ef55..8b892f514 100644 --- a/app/src/main/res/xml/preferences_widget.xml +++ b/app/src/main/res/xml/preferences_widget.xml @@ -57,10 +57,6 @@ android:title="@string/row_spacing" android:summary="%s" /> - - + +