diff options
author | desperateCoder <echotodevnull@gmail.com> | 2021-03-28 13:38:52 +0300 |
---|---|---|
committer | Niedermann IT-Dienstleistungen <stefan-niedermann@users.noreply.github.com> | 2021-03-28 20:00:49 +0300 |
commit | 998472c93956c620817c77fdb69a8d811689a1ba (patch) | |
tree | 5b5b6fa1846d1edcb0cf87f2f56496999fb32f2d /app | |
parent | 04a4167f58c7b9b99dd42192cff1807c2ac9e749 (diff) |
#630 added search-text to filter
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/DataBaseAdapter.java | 6 |
1 files changed, 6 insertions, 0 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 e83a44752..904ecd301 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 @@ -318,6 +318,12 @@ public class DataBaseAdapter { throw new IllegalArgumentException("You need to add your new EDueType value\"" + filter.getDueType() + "\" here!"); } } + if (filter.getFilterText() != null && !filter.getFilterText().isEmpty()) { + query.append("and (c.description like ? or c.title like ?)"); + String filterText = "%"+filter.getFilterText()+"%"; + args.add(filterText); + args.add(filterText); + } if (filter.getArchiveStatus() != FilterInformation.EArchiveStatus.ALL) { query.append(" and c.archived = ").append(filter.getArchiveStatus() == FilterInformation.EArchiveStatus.ARCHIVED ? 1 : 0); } |