mirror of
https://github.com/rangermix/TwitchDropsMiner.git
synced 2026-05-26 07:08:04 +00:00
Fix inventory view display issues with campaigns having both timed and sub-based drops
This commit is contained in:
10
gui.py
10
gui.py
@@ -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(
|
||||
|
||||
@@ -370,7 +370,7 @@ class DropsCampaign:
|
||||
|
||||
@cached_property
|
||||
def finished(self) -> bool:
|
||||
return all(d.is_claimed for d in self.drops)
|
||||
return all(d.is_claimed or d.required_minutes <= 0 for d in self.drops)
|
||||
|
||||
@cached_property
|
||||
def claimed_drops(self) -> int:
|
||||
|
||||
Reference in New Issue
Block a user