When setting "until turned off" it effectively sets it to today in a year. Now with leap year this appears to have broken.
Instead, just use 100 days, which is plenty, even if we come up with a "for 1 month" option maybe.
Details
- Reviewers
ngraham - Group Reviewers
Plasma - Commits
- R120:a5c9e000b9c9: [Notifications] Don't show do not disturb end date beyond 100 days
5.18
- No longer shows "do not disturb until 2021-04-11" when I choose "until turned off"
Diff Detail
- Repository
- R120 Plasma Workspace
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Wouldn't be better instead to not display a date in case the "until turned off" option is chosen? I personally found it confusing the first time I chose this option, and yet a date was shown.
That is exactly what it should do and it did originally but I just noticed it still showed a date, presumable for leap year reasons. With this patch no date is shown again when "until turned off" is chosen.
According to settings.h documentation
When invalid or in the past, do not disturb mode should be considered disabled.
So why not setting date to invalid date or one year in the past and do a test if date is in the future
This is for displaying whether do not disturb is on. The "until disabled" option just sets it to one year in the future. But it's odd to show "until 2021", so we don't show the date when it's too far in the future.
Alternative proposal: since showing any date in the UI will be weird, how about we say "until turned off" instead? That would mirror the text in the menu item.
I know, but that's what the menu item says.
I'm saying we should make then consistent somehow: either both should say "until turned off" (even if that's a lie) or they should both say "for a year", or "for three months", or whatever.
I find "for a year" odd. Also, this is a bug fix, so can we get this in or not. Changing strings can then be done in master, if we want to.
All right let's do that on the stable branch to fix the bug and then change the string in master to be consistent.