Add error message to Lightshow file

This commit is contained in:
Quentin Millardet
2024-05-09 00:46:43 +02:00
parent a1c3891847
commit 1da7622e07
3 changed files with 40 additions and 21 deletions

View File

@@ -26,8 +26,16 @@ class LightshowDownloadView: UITableViewController{
// Fetch a cell of the appropriate type.
let cell = tableView.dequeueReusableCell(withIdentifier: "lightshowDownloadCell")
let model = model?.getStudentAtIndex(indexPath.row);
let isOk : Bool = model?.isOkFiles() ?? false;
(cell as! LightshowDownloadCell).LightshowName.text = model?.name
(cell as! LightshowDownloadCell).warningMessage.isHidden = model?.isOkFiles() ?? false;
(cell as! LightshowDownloadCell).warningMessage.isHidden = isOk;
var alertText = ""
if (!isOk){
alertText = "(Le fichcier mp3 ou fseq n'a pas été reconnu)"
}
(cell as! LightshowDownloadCell).alertLabel.text = alertText
return cell!
}