aj3423 / SpamBlocker

Android Call/SMS blocker.
MIT License
461 stars 24 forks source link

Log SMS in database but NOT display content in activity log + UI suggestion #176

Open noto10 opened 5 days ago

noto10 commented 5 days ago

I refer to the Log SMS Content option:

spamblocker UI 001

Is it possible to add an option to Log SMS Content to database but NOT display it in the activity log? At present, the UI allows the user to tap to view the contents in Spamblocker if logging is enabled OR tap/swipe right to open in the native SMS app if logging is disabled. It would be good if more granular control is available by making logging to database independent of content viewing.

Perhaps to simplify matters,

  1. Tap to expand/collapse content to view.
  2. Swipe to open in SMS app (currently in place).
  3. Separate Option to Enable/Disable Logging to Database.

I find having the content displayed (even in part) can clutter up the display and increase the level of visual distraction as seen below. This is especially so if there are emojis in the content. Comparing the messages with no content displayed ① and those with content ② should illustrate my point. Having the content displayed in the same area as the number and description (2nd line?) also makes it harder for the eye to "see" the description as it tends to get lost and overwhelmed due to the color of the 1st line and the possible colors in the 3rd line (content). I think by making viewing the content intentional (maybe also optional?) via tapping and separating it from logging will be better.

spamblocker UI 002

Just my opinion and for your consideration.

aj3423 commented 5 days ago

I think a better solution would be to add an option for customizing the number of displayed rows when collapsed.

The default value would be 1, same behavior as now. You can change it to 0 to completely hide it. Some might want to set it to 2+.

noto10 commented 4 days ago

I think a better solution would be to add an option for customizing the number of displayed rows when collapsed.

The default value would be 1, same behavior as now. You can change it to 0 to completely hide it. Some might want to set it to 2+.

Great idea. Can I then assume that logging to database can be enabled/disabled independently?

aj3423 commented 4 days ago

Yeah, logging or not remains unchanged, when logging is enabled, there will be a new integer option "default rows".

aj3423 commented 4 days ago

done. https://github.com/aj3423/SpamBlocker/actions/runs/11625659999

noto10 commented 4 days ago

Thanks. Working out really well.

Umotas commented 2 days ago

there will be a new integer option "default rows"

Could you make this feature for "Number Rules"

file.csv: pattern,isBlacklist,description 111111,false,white 222222,false,white 333333,true,black

File is imported well "as a multiple rules" File isn't imported correctly "as a single rule" (I understand there is no logic to import this file as single rule, but other people notice)

aj3423 commented 2 days ago

I don't understand, what's the expected result?

File isn't imported correctly "as a single rule"

Umotas commented 2 days ago

Result: this file was imported as one rule = blacklist = all three numbers

aj3423 commented 2 days ago

It works fine, what's the problem?

Screenshot_20241103-145455_SpamBlocker.png

Umotas commented 2 days ago

pattern,isBlacklist,description 111111,false,white 222222,false,white 333333,true,black

111111,222222 - are FALSE, = WHITELIST

aj3423 commented 2 days ago

That's expected, for a single rule, it can only be either blacklist or whitelist, can't have both.

Umotas commented 2 days ago

OK. Understand. Thanks

Umotas commented 2 days ago

Other people ask for divide one rules list into two lists: one is black list, and one is white list. What is your opinion about this

aj3423 commented 2 days ago

Makes sense, I'll change it to generate two rules if there are different types.

aj3423 commented 2 days ago

done. https://github.com/aj3423/SpamBlocker/actions/runs/11649954291

Umotas commented 2 days ago

Ok, importing is working. Thanks.

But I mean other in my last post: what do you think about to have two chapters of rules. First chapter is a whitelist's rules. Second chapter is a blacklist rules. I have no my opinion about this. Other people ask about it.

  1. Could you make feature to change quantity displaying rows for rules in Rule-list.
aj3423 commented 2 days ago

what do you think about to have two chapters of rules. First chapter is a whitelist's rules. Second chapter is a blacklist

It's useful to group them together, they are sorted by priority, which gives you a clear visual representation of which takes precedence in case of a conflict.

Could you make feature to change quantity displaying rows for rules in Rule-list.

How many rules do you have? What's the current problem with it?

Umotas commented 2 days ago

How many rules do you have? What's the current problem with it?

No problems I think to increase description-fields of each rules. And I would like to see this descriptions in list of rules. Now I can see only one string for description in the rule-list. I'd like see 2-3 strings for each description of every rule.

P.S. In this case I can have my Contact-database as rule-list. Buit-in Android Contacts has no access to my real Contact-database. Only SpamBlocker will have this base of my contacts.

aj3423 commented 2 days ago

Buit-in Android Contacts has no access to my real Contact-database. Only SpamBlocker will have this base of my contacts.

That's unexpected... You store contact numbers in SB rather than the Contacts app, now I see why you have lots of rules, the description is used for their names.

I'll add some UI options:

Umotas commented 2 days ago

Yes, thanks. It is important to use for descriptions all place - from left side to right side of record. Now Description begins from left side and ends to "Priority ..."

aj3423 commented 2 days ago

use for descriptions all place - from left side to right side of record.

It's not easy to implement like this, I mean two lines with different width. But I'll replace the text "Priority: " with a small icon to free some space,

noto10 commented 2 days ago

I think a better solution would be to add an option for customizing the number of displayed rows when collapsed.

The default value would be 1, same behavior as now. You can change it to 0 to completely hide it. Some might want to set it to 2+.

Yeah, logging or not remains unchanged, when logging is enabled, there will be a new integer option "default rows".

Hi. Revisiting this for my understanding - is it not possible to have the same behavior of user-customizable number of rows even if logging is disabled? I find the collapsible feature invaluable but it appears to work only if logging is enabled. I can imagine this to be universally useful regardless of logging.

aj3423 commented 2 days ago

When the logging is disabled, the sms is not even logged, there is nothing to expand, what's the point of customizing the number of rows?

noto10 commented 2 days ago

When the logging is disabled, the sms is not even logged, there is nothing to expand, what's the point of customizing the number of rows?

I see. I misunderstood the logging part to be for the database and thought as long as the SMS shows up in the action list, it can be viewed (sans logging) since the action list holds an ongoing record of the messages which passed through Spamblocker.

So, if I understand correctly, when logging is off, all Spamblocker has is the originating number after processing with regex.

aj3423 commented 2 days ago

when logging is off, all Spamblocker has is the originating number after processing with regex.

Yeah, that's right.

noto10 commented 2 days ago

It's not easy to implement like this, I mean two lines with different width. But I'll replace the text "Priority: " with a small icon to free some space,

May I clarify if this is the "Priority:" ?

image

aj3423 commented 2 days ago

Yeah, like this: image

noto10 commented 2 days ago

That's really compact.

I think the original "Priority" is more self-explanatory and helps the UI to be more intuitive. Kind of makes it easy to read without any subconscious processing of another icon. Of course, unless space-saving is critical in the majority of use cases. Just my preference, though.

aj3423 commented 2 days ago

Some languages have very long text, and this color Light Magenta is used to indicate the priority throughout the app, along with the icon, this combination is easy to understand, I suppose.

Umotas commented 1 day ago

Yeah, like this: image Yes, it is perfectly

aj3423 commented 1 day ago

done. https://github.com/aj3423/SpamBlocker/actions/runs/11649954291

Umotas commented 1 day ago

I cannot see visual changes

aj3423 commented 1 day ago

Sorry, wrong action link... This is the correct link: https://github.com/aj3423/SpamBlocker/actions/runs/11663611939. It's in the context menu.

Umotas commented 1 day ago

Yes, perfectly ❗ Working! And you made auto-increasing description-field in edit-mode! Thanks!

Umotas commented 18 hours ago

I am not sure, in rule I set 'Raw Number'. App doesn't save +111111 number, writes 'invalid regex'

P.s. I don't use plus in rules, I only try this 'raw number'

aj3423 commented 15 hours ago

I am not sure, in rule I set 'Raw Number'. App doesn't save +111111 number, writes 'invalid regex'

The + symbol has special meaning, should be escaped like \+111111 when being used as a literal string.

Umotas commented 14 hours ago

The + symbol has special meaning, should be escaped like +111111 when being used as a literal string.

I understand this all. But App cannot save such variant anyway: \+1111 (with raw/without raw) I cannot set \+ in the start of line. In the end of line 111111\+ is working.

aj3423 commented 13 hours ago

I see, the red error is updated on input change, so it doesn't disappear when you turn on the RawMode, just type something and it will disappear, I'll fix it later.

Umotas commented 13 hours ago

just type something and it will disappear

OK, It is working, thanks.