Skip to content

Commit

Permalink
TGP-2678: Swap if around
Browse files Browse the repository at this point in the history
  • Loading branch information
Reece-Carruthers committed Oct 21, 2024
1 parent 703e6e0 commit c2522fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/HomePageController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ class HomePageController @Inject() (
}

private def getDownloadLinkMessagesKey(opt: Option[DownloadDataSummary], doesGoodsRecordExist: Boolean): String =
if (!doesGoodsRecordExist) {
"homepage.downloadLinkText.noGoodsRecords"
} else {
if (doesGoodsRecordExist) {
opt.map(_.status) match {
case Some(FileInProgress) | Some(FileReadyUnseen) | Some(FileReadySeen) =>
"homepage.downloadLinkText.filesRequested"
case _ =>
"homepage.downloadLinkText.noFilesRequested"
}
} else {
"homepage.downloadLinkText.noGoodsRecords"
}
}

0 comments on commit c2522fb

Please sign in to comment.