时间轴过去和现在的动作“最近”聚合混合

发布于 2024-12-09 22:05:19 字数 528 浏览 0 评论 0原文

我为对象“竞赛”设置设置了“已完成”操作:

  • 过去:约翰·多伊完成了示例竞赛
  • 当前:约翰·多伊将在今天参加示例竞赛

问题是当我为过去已完成的竞赛发布一个操作,然后发布当前比赛的动作。当它显示最近的活动时,它将两者混合在一起,假设我将示例当前比赛发布为当前比赛,并设置了 expires_in ,并将过去的比赛设置为 expires_in 未设置。

我会在我的个人资料中看到这一点:

John Doe 今天将参加当前比赛和过去比赛的示例。

或类似内容:

John Doe 今天将参加当前比赛示例以及另外 2 场比赛。

如果我发布了多场未出席的比赛。

您知道这有多糟糕,我如何防止这两者作为我的个人资料中的最近活动“混合”,我是否必须进行单独的操作并将其保留用于过去或现在的操作?

I have the Action "completed" for the Object "race" setup like this:

  • Past: John Doe completed Example Race
  • Present: John Doe will be competing today in Example Race

The problem is when I post an action for a past completed race and then post an action for a current race. It mixes the two when it shows recent activity, say I post Example Current Race as the present race with expires_in set, and Past Race with the expires_in not set.

I would get this in my profile:

John Doe will be competing today in Example Current Race, and Past Race.

or something like:

John Doe will be competing today in Example Current Race, and 2 other races.

if I posted multiple non-present races.

You get how this would be bad, how do I prevent these two from "mixing" as recent activities in my profile, do I have to make a separate action and just have it reserved for past or present actions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

囍孤女 2024-12-16 22:05:19

目前,防止这种情况的方法是发布两个单独的操作:

  • yourapp:competing - “将竞争...”(现在时和过去时的文本相同)
  • yourapp:competed - “竞争...”(相同的文本)用于现在时和过去时)

当用户当前正在参与某项活动时,发布第一个操作并存储您返回的操作 ID。当他们参加比赛后,删除第一个操作,然后发布第二个类型的另一个操作。

本质上,你是通过交换动作来强制改变时态。这也可以防止相同类型但不同时态的动作聚合在一起。

对事件的支持尚不理想——我们正在考虑这一点。

At present, the way to prevent this is to post two separate actions:

  • yourapp:competing - "will compete in..." (same text for present and past tense)
  • yourapp:competed - "competed in..." (same text for present and past tense)

When a user is currently competing in something, post the first action and store the action ID you get back. When they've competed in the event, delete the first action, and post another action of the second type.

Essentially you're forcing a change in tense by swapping the actions. This also prevents actions of the same type, but different tense, being aggregated together.

Support for events is not yet ideal - something we're looking at.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文