-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display limits of email recovery #3281
base: master
Are you sure you want to change the base?
Conversation
a4dab10
to
57777f7
Compare
This curious thing is happening: when accessing the recover deleted messages panel, at first an error is thrown, but when i trigger a hot reload, then everything is fine: IMG_0450.movthe method is this: String getRestorationHorizon(BuildContext context) {
return ((_session
?.props[0] as Map<CapabilityIdentifier, CapabilityProperties>?)
?[capabilityDeletedMessagesVault]
?.props[0] as Map<String, dynamic>) // line causing the error
['restorationHorizon'];
} and the error is |
This PR has been deployed to https://linagora.github.io/tmail-flutter/3281. |
7ba818f
to
aa8edd1
Compare
aa8edd1
to
de6b5e4
Compare
lib/features/email_recovery/presentation/email_recovery_controller.dart
Outdated
Show resolved
Hide resolved
@hoangdat is this work ok? @florentos17 could you rebase this? |
lib/features/email_recovery/presentation/email_recovery_controller.dart
Outdated
Show resolved
Hide resolved
if it's all good for you then i'll squash and rebase |
|
||
// this class is a local copy of the one found at | ||
// https://github.com/desktop-dart/duration/blob/master/lib/src/parse/parse.dart#L6 | ||
static Duration parseDuration(String input, {String separator = ','}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we need this? how about using dependency directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remembered it was asked by @tddang-linagora
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should minimize the using of third party library. If we only need a small function, let's copy it over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from my point of view, we should use 3rd party lib to get the support from the community, don't need effort in maintaining it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tend to agree with @hoangdat .
Why maintain this code if we have it from a healthy package (size, community, etc..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll drop the commit removed package duration usages
when squashing then (if ok for you @tddang-linagora)
it is already done on the backend side (the request is modified to be sure it complies with the calendar limit if not already). but you are absolutely right, we could add a check here on the frontend as well: circle the date in red if invalid and/or refuse to send the request if invalid. but do you think it’s necessary ? the user is already warned with the yellow banner, and it’s a tiny and hidden feature, so maybe it could be ok to leave it like that ? |
Btw, when I push the recovery request with date time out of limitation, back-end still response the completed status with 0 completion, 0 .... We should have better response for this. |
Technically with the yellow banner that's already the case. The option is quite hidden (who knows where deleted message menu is) and is niche. 1% of users will open dead letter menu item. 1% will manually select a date. So we are speaking of user experience for 0.01%. Are we lying to the user? No, backend will transparently filter data, which is what the banner says. Acceptable. Can we please move on? |
tackling the issue 3219 (duplicated with the issue 3274)