diff --git a/rslib/src/deckconfig/update.rs b/rslib/src/deckconfig/update.rs index af4bb7572..956786995 100644 --- a/rslib/src/deckconfig/update.rs +++ b/rslib/src/deckconfig/update.rs @@ -411,10 +411,16 @@ fn update_deck_limits(deck: &mut NormalDeck, limits: &Limits, today: u32) { fn update_day_limit(day_limit: &mut Option, new_limit: Option, today: u32) { if let Some(limit) = new_limit { day_limit.replace(DayLimit { limit, today }); - } else if let Some(limit) = day_limit { - // instead of setting to None, only make sure today is in the past, - // thus preserving last used value - limit.today = limit.today.min(today - 1); + } else { + // if the collection was created today, the + // "preserve last value" hack below won't work + // clear "future" limits as well (from imports) + day_limit.take_if(|limit| limit.today == 0 || limit.today > today); + if let Some(limit) = day_limit { + // instead of setting to None, only make sure today is in the past, + // thus preserving last used value + limit.today = limit.today.min(today.saturating_sub(1)); + } } }