Skip to content
This repository has been archived by the owner on Sep 25, 2021. It is now read-only.

Cannot Properly Filter Empty Subject Lines #744

Closed
Hitomi98 opened this issue Sep 15, 2019 · 3 comments · Fixed by #739
Closed

Cannot Properly Filter Empty Subject Lines #744

Hitomi98 opened this issue Sep 15, 2019 · 3 comments · Fixed by #739

Comments

@Hitomi98
Copy link

Short and descriptive title:
Clover cannot seem to use regex to filter empty subject lines

Detailed explanation of the issue:
I am trying to filter the posts on all boards such that only posts with nonempty subject lines
are visible but it seems that the app cannot properly match empty regex strings
The following do not work:
/^$/
/^(?![\s\S])/
They should match on empty strings but they don't

Steps to reproduce the issue:
This is what the filter screen looks like:
filters
The "types" selected is just subject

Android version: 7.0
Phone model: SM-G935U
Clover version: v3.0.2

@Adamantcheese
Copy link
Contributor

This is due to it defaulting to no match when the input string is empty (ie subject line is empty).

if (TextUtils.isEmpty(text)) {
return false;

@Hitomi98
Copy link
Author

Hitomi98 commented Sep 15, 2019

This is due to it defaulting to no match when the input string is empty (ie subject line is empty).

if (TextUtils.isEmpty(text)) {
return false;

Even if I enable the regex that I posted above, the filters do not work when I actually go to browse a board, posts with nonempty subject lines still show up.

@Adamantcheese
Copy link
Contributor

/^$/gmi is not a valid regex to Clover. gm are not flags that are supported, only i is, and it will return a filter that is effectively /^$/i. Again, NO FILTER will match an empty string due to that code snippet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants