Yesterday's report returning null when it shouldn't.


AzeTheGreat
  • Branch: Live Branch Version: Windows Pending

Accessing ReportManager.Instance.YesterdaysReport returns null on the second cycle, when there is a report for the previous day.

It looks like todaysReport is not added to the dailyReports until night, so this code,

public ReportManager.DailyReport YesterdaysReport
	{
		get
		{
			if (this.dailyReports.Count <= 1)
			{
				return null;
			}
			return this.dailyReports[this.dailyReports.Count - 1];
		}
	}

should probably check for 0 not 1,

public ReportManager.DailyReport YesterdaysReport
	{
		get
		{
			if (this.dailyReports.Count = 0)
			{
				return null;
			}
			return this.dailyReports[this.dailyReports.Count - 1];
		}
	}

Noticed this because the insufficient oxygen generation notification won't trigger on the first or second cycle.


Steps to Reproduce
Access ReportManager.Instance.YesterdaysReport on the second cycle and get null, when the cycle 1 report should be returned.

Status: Pending

This issue has not been confirmed by a developer yet.


  Report Bug


User Feedback


There are no comments to display.



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now