diff options
author | desperateCoder <echotodevnull@gmail.com> | 2021-02-01 14:47:17 +0300 |
---|---|---|
committer | desperateCoder <echotodevnull@gmail.com> | 2021-02-01 14:47:17 +0300 |
commit | 9204aeab32cdee5263eb97d5071d88238b4f7e5c (patch) | |
tree | 11a9680b4ce4fa03b3bae8b24d6e7a165adbe387 | |
parent | 4be659a8387b82d676048806e32f47498ea5d9d7 (diff) |
fix #818
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DataBaseAdapter.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DataBaseAdapter.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DataBaseAdapter.java index c3d77f3f8..9c6b1ec34 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DataBaseAdapter.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DataBaseAdapter.java @@ -13,11 +13,14 @@ import androidx.sqlite.db.SimpleSQLiteQuery; import java.time.Instant; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.NoSuchElementException; +import java.util.Set; import java.util.stream.Collectors; import it.niedermann.nextcloud.deck.DeckLog; @@ -190,7 +193,7 @@ public class DataBaseAdapter { } } - private void filterRelationsForCard(@Nullable List<FullCard> card) { + private void filterRelationsForCard(@Nullable Collection<FullCard> card) { if (card == null) { return; } @@ -1243,7 +1246,7 @@ public class DataBaseAdapter { public List<FilterWidgetCard> getCardsForFilterWidget(Integer filterWidgetId) { FilterWidget filterWidget = getFilterWidgetByIdDirectly(filterWidgetId); FilterInformation filter = new FilterInformation(); - List<FullCard> cardsResult = new ArrayList<>(); + Set<FullCard> cardsResult = new HashSet<>(); if (filterWidget.getDueType() != null) { filter.setDueType(filterWidget.getDueType()); } else filter.setDueType(EDueType.NO_FILTER); @@ -1322,7 +1325,7 @@ public class DataBaseAdapter { return result; } - private void handleWidgetTypeExtras(FilterWidget filterWidget, List<FullCard> cardsResult) { + private void handleWidgetTypeExtras(FilterWidget filterWidget, Collection<FullCard> cardsResult) { if (filterWidget.getWidgetType() == EWidgetType.UPCOMING_WIDGET) { // https://github.com/stefan-niedermann/nextcloud-deck/issues/800 all cards within non-shared boards need to be included List<Long> accountIds = null; |