Skip to content

Commit ff095fa

Browse files
committed
Search content in articles
1 parent 3ba9d6e commit ff095fa

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
source "https://rubygems.org"
22

33
gem 'fastlane', "~> 2.222"
4-
gem "rexml", "~> 3.3.4"
4+
gem "rexml", "~> 3.3.6"

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ GEM
171171
trailblazer-option (>= 0.1.1, < 0.2.0)
172172
uber (< 0.2.0)
173173
retriable (3.1.2)
174-
rexml (3.3.4)
174+
rexml (3.3.6)
175175
strscan
176176
rouge (2.0.7)
177177
ruby2_keywords (0.0.5)
@@ -214,7 +214,7 @@ PLATFORMS
214214

215215
DEPENDENCIES
216216
fastlane (~> 2.222)
217-
rexml (~> 3.3.4)
217+
rexml (~> 3.3.6)
218218

219219
BUNDLED WITH
220220
2.4.21

app/src/main/java/com/capyreader/app/ui/articles/detail/ArticleView.kt

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,18 +90,6 @@ fun ArticleView(
9090
.padding(innerPadding)
9191
.fillMaxSize()
9292
) {
93-
if (article == null) {
94-
Box(
95-
contentAlignment = Alignment.Center,
96-
modifier = Modifier
97-
.padding(bottom = 64.dp)
98-
99-
.fillMaxSize()
100-
) {
101-
CapyPlaceholder()
102-
}
103-
}
104-
10593
Column(
10694
Modifier.fillMaxSize()
10795
) {
@@ -112,6 +100,17 @@ fun ArticleView(
112100
modifier = Modifier.fillMaxSize(),
113101
)
114102
}
103+
104+
if (article == null) {
105+
Box(
106+
contentAlignment = Alignment.Center,
107+
modifier = Modifier
108+
.padding(bottom = 64.dp)
109+
.fillMaxSize()
110+
) {
111+
CapyPlaceholder()
112+
}
113+
}
115114
}
116115
}
117116

capy/src/main/sqldelight/com/jocmp/capy/db/articles.sq

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ JOIN feeds ON articles.feed_id = feeds.id
1919
JOIN article_statuses ON articles.id = article_statuses.article_id
2020
WHERE ((article_statuses.read = :read AND article_statuses.last_read_at IS NULL OR article_statuses.last_read_at >= :lastReadAt) OR :read IS NULL)
2121
AND (article_statuses.starred = :starred OR :starred IS NULL)
22-
AND (articles.title LIKE '%' || :query || '%' OR articles.summary LIKE '%' || :query || '%' OR :query IS NULL)
22+
AND (articles.title LIKE '%' || :query || '%' OR articles.content_html LIKE '%' || :query || '%' OR :query IS NULL)
2323
GROUP BY articles.id
2424
ORDER BY articles.published_at DESC
2525
LIMIT :limit OFFSET :offset;
@@ -30,7 +30,7 @@ FROM articles
3030
JOIN article_statuses ON articles.id = article_statuses.article_id
3131
WHERE ((article_statuses.read = :read AND article_statuses.last_read_at IS NULL OR article_statuses.last_read_at >= :lastReadAt) OR :read IS NULL)
3232
AND (article_statuses.starred = :starred OR :starred IS NULL)
33-
AND (articles.title LIKE '%' || :query || '%' OR articles.summary LIKE '%' || :query || '%' OR :query IS NULL);
33+
AND (articles.title LIKE '%' || :query || '%' OR articles.content_html LIKE '%' || :query || '%' OR :query IS NULL);
3434

3535
allByFeeds:
3636
SELECT
@@ -54,7 +54,7 @@ JOIN article_statuses ON articles.id = article_statuses.article_id
5454
WHERE articles.feed_id IN :feedIDs
5555
AND ((article_statuses.read = :read AND article_statuses.last_read_at IS NULL OR article_statuses.last_read_at >= :lastReadAt) OR :read IS NULL)
5656
AND (article_statuses.starred = :starred OR :starred IS NULL)
57-
AND (articles.title LIKE '%' || :query || '%' OR articles.summary LIKE '%' || :query || '%' OR :query IS NULL)
57+
AND (articles.title LIKE '%' || :query || '%' OR articles.content_html LIKE '%' || :query || '%' OR :query IS NULL)
5858
GROUP BY articles.id
5959
ORDER BY articles.published_at DESC
6060
LIMIT :limit OFFSET :offset;
@@ -65,7 +65,7 @@ FROM articles
6565
JOIN article_statuses ON articles.id = article_statuses.article_id
6666
WHERE articles.feed_id IN :feedIDs
6767
AND ((article_statuses.read = :read AND article_statuses.last_read_at IS NULL OR article_statuses.last_read_at >= :lastReadAt) OR :read IS NULL)
68-
AND (articles.title LIKE '%' || :query || '%' OR articles.summary LIKE '%' || :query || '%' OR :query IS NULL)
68+
AND (articles.title LIKE '%' || :query || '%' OR articles.content_html LIKE '%' || :query || '%' OR :query IS NULL)
6969
AND (article_statuses.starred = :starred OR :starred IS NULL);
7070

7171
findArticleIDsByStatus:

0 commit comments

Comments
 (0)