Fix inventory view display issues with campaigns having both timed and sub-based drops

This commit is contained in:
DevilXD committed 2025-03-02 10:26:12 +01:00
1 parent 6d803978a3
commit b46b77d20c
2 files changed
+8 -4

No files matched your search

+7 -3
View File
@@ -1503,9 +1503,13 @@ class InventoryOverview:
time=drop.ends_at.astimezone().replace(microsecond=0, tzinfo=None)
)
else:
progress_text = _("gui", "inventory", "minutes_progress").format(
minutes=drop.required_minutes
)
if drop.required_minutes > 0:
progress_text = _("gui", "inventory", "minutes_progress").format(
minutes=drop.required_minutes
)
else:
# required_minutes is zero for subscription-based drops
progress_text = ''
if datetime.now(timezone.utc) < drop.starts_at > drop.campaign.starts_at:
# this drop can only be earned later than the campaign start
progress_text += '\n' + _("gui", "inventory", "starts").format(