shr icon indicating copy to clipboard operation
shr copied to clipboard

When we increment on click, should we update storage?

Open danpastori opened this issue 6 years ago • 1 comments

Problem

We have a flag for incrementing the count on click. This doesn't update the storage so if I refresh the page my click isn't stored.

Rationale

It can be kind of misleading when I see an increment, refresh the page and it isn't there.

Solution

Update the storage if increment is set.

Pros of Solution:

Refreshing the page will show the new share.

Cons of Solution:

If I click and didn't share, then the number will be wrong and won't correct itself until the cache expires.

Let me know your thoughts on this and we can find a way to resolve this issue!

danpastori avatar Oct 04 '18 21:10 danpastori

I'd say no on this since the increment assumes the share took place. It would get confusing if we're manipulating the source data. Perhaps what we could do is invalidate the cache for that URL/network on click?

sampotts avatar Feb 17 '19 14:02 sampotts