Skip to content
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

[Regression Fix] Readd timeline caching #478

Merged
merged 4 commits into from
Oct 14, 2020

Conversation

Mikescops
Copy link
Member

Fixing a regression following #468 after update of the vue-virtual-grid package.

The caching of the timeline is now used again. It helped simplifying some part of the logic too.

Signed-off-by: Corentin Mors <corentin.mors@dashlane.com>
@Mikescops Mikescops added bug Something isn't working 3. to review Waiting for reviews labels Oct 13, 2020
@Mikescops Mikescops self-assigned this Oct 13, 2020
Signed-off-by: Corentin Mors <corentin.mors@dashlane.com>
src/components/Loader.vue Outdated Show resolved Hide resolved
src/components/Loader.vue Outdated Show resolved Hide resolved
@Mikescops
Copy link
Member Author

@skjnldsv done

src/views/Timeline.vue Outdated Show resolved Hide resolved
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny change, all good code-wise :)
One question though, why use Promise.resolve ?
Returning should be enough in those cases,

@Mikescops
Copy link
Member Author

The lib expect a Promise so that it can do other actions in the meantime.

Signed-off-by: Corentin Mors <corentin.mors@dashlane.com>
Signed-off-by: Corentin Mors <corentin.mors@dashlane.com>
@Mikescops Mikescops force-pushed the platform/readd-timeline-caching branch from b4a40dc to 753447b Compare October 14, 2020 14:14
@Mikescops Mikescops merged commit f84e43a into master Oct 14, 2020
@Mikescops Mikescops deleted the platform/readd-timeline-caching branch October 14, 2020 14:29
@skjnldsv
Copy link
Member

The lib expect a Promise so that it can do other actions in the meantime.

The async function resolves themselves with return or throw.
Async functions are already promises :)

@skjnldsv
Copy link
Member

This returns a promise:

function resolveAfter2Seconds() {
  return new Promise(resolve => {
    setTimeout(() => {
      resolve('resolved');
    }, 2000);
  });
}

Promise.resolve have no context here. I don't think that is necessary

@Mikescops
Copy link
Member Author

hmmm I need to better look at it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants