Skip to content

Commit 78189d6

Browse files
committed
Update IHWDownloadScheduleViewController.m
Fixed long class name bug ("French V: Contemporary Culture and Communication")
1 parent 06fe582 commit 78189d6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

iHW-iOS/iHW/iHW/IHWDownloadScheduleViewController.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
172172
} else if ([[div getAttributeNamed:@"id"] isEqualToString:@"sectTitle1"]) {
173173
//Found a course name
174174
lastName = [[[div findChildTags:@"span"] objectAtIndex:0] contents];
175+
if (lastName == nil) {
176+
//For long class names like "French V: Contemporary Culture and Communication", the name is in a double nested span tag
177+
lastName = [[[div findChildTags:@"span"] objectAtIndex:1] contents];
178+
}
175179
} else if ([[div getAttributeNamed:@"id"] isEqualToString:@"sectPeriodList1"]) {
176180
//Found a course period list
177181
lastPeriodList = [[[div findChildTags:@"span"] objectAtIndex:0] contents];

0 commit comments

Comments
 (0)