-
Notifications
You must be signed in to change notification settings - Fork 274
feat: split envelopes by time of arrival #11264
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
Conversation
For reactivity: would it make sense to maintain the brackets in Pinia? Brackets relative to current time are probably not reactive. But if we commit the timestamp to Pinia, e.g. at every synchronization, and re-evaluate, it should be fine. |
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.
There is a problem with an empty view initially. When the app loads there are no envelopes at first. Fetching initial envelopes is handled inside Mailbox.vue
which is not rendered as there are no envelopes initially (and no groups as a consequence). As a result, no envelopes will be fetched and rendered until the first background sync hits.
My suggestions:
- Move the sections/groups from
MailboxThread.vue
intoMailbox.vue
. - Move some of the envelope fetching logic from
Mailbox.vue
toMailboxThread.vue
(have a look atmounted()
,loadEnvelopes()
andprefetchOtherMailboxes()
inMailbox.vue
).
In any case, you should rebase against latest origin/main
soon as I implemented a lot of changes to the sync logic in Mailbox.vue
.
6bb373f
to
d95f003
Compare
Bump. You have a computed property that depends on time. How does Vue handle this side effect? Is the window for messages in the last hour evaluated again as time passes? |
you are right, the current one is not the ideal solution, i will do what you suggested and commit the timestamp to Pinia. I was focused on fixing the bugs i caused with this feature and didnt pay attention to this part yet. |
1ce13ea
to
4b56871
Compare
src/components/MailboxThread.vue
Outdated
startOfLastMonth.setMonth(startOfLastMonth.getMonth() - 1) | ||
|
||
const groups = { | ||
[t('mail', 'Last hour')]: [], |
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 will suggest a different approach later because I find it a bit weird to use a translate string as key.
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.
hey, i pushed another fixup, is that what you had in mind? I dont mind changing it again if you have a better approach.
7a991d3
to
260384e
Compare
Signed-off-by: greta <[email protected]>
260384e
to
eaa7405
Compare
fixes #11057
to do