Skip to content

Commit

Permalink
Fix evemondevteam#82 completed industry job notification
Browse files Browse the repository at this point in the history
  • Loading branch information
wbSD committed Oct 8, 2018
1 parent 151604d commit baa96ed
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/EVEMon.Common/Models/Collections/IndustryJobCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,18 @@ internal void Import(IEnumerable<EsiJobListItem> src, IssuedFor issuedFor)
{
DateTime limit = job.EndDate.AddDays(IndustryJob.MaxEndedDays);
// For jobs which are not yet ended, or are active and not ready (active is
// defined as having an empty completion date), and are not already in list
// defined as having an empty completion date)
if (limit >= now || (job.CompletedDate == DateTime.MinValue && job.Status !=
CCPJobCompletedStatus.Ready) && !Items.Any(x => x.TryImport(job, issuedFor,
m_ccpCharacter)))
CCPJobCompletedStatus.Ready))
{
// Only add jobs with valid items
var ij = new IndustryJob(job, issuedFor);
if (ij.InstalledItem != null && ij.OutputItem != null)
newJobs.AddLast(ij);
// Where the job isn't already in the list
if (!Items.Any(x => x.TryImport(job, issuedFor, m_ccpCharacter)))
{
// Only add jobs with valid items
var ij = new IndustryJob(job, issuedFor);
if (ij.InstalledItem != null && ij.OutputItem != null)
newJobs.AddLast(ij);
}
}
}
// Add the items that are no longer marked for deletion
Expand Down

0 comments on commit baa96ed

Please sign in to comment.