Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: show watched flag for seasons #1062

Merged
merged 2 commits into from
Jun 14, 2024

Conversation

wutschel
Copy link
Collaborator

Description

This PR adds the possibility to show the watched flag for seasons in the so-called episodesView.

Screenshot: https://ibb.co/QHPYSnb

Summary for release notes

Feature: show watched flag for seasons

Comment on lines 3070 to 3077
if (isWatched) {
UIImageView *watchedIcon = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"OverlayWatched"]];
watchedIcon.frame = CGRectMake(CGRectGetMaxX(thumbImageView.frame) - FLAG_SIZE / 2 - TINY_PADDING,
CGRectGetMaxY(thumbImageView.frame) - FLAG_SIZE - TINY_PADDING,
CGRectGetWidth(watchedIcon.frame),
CGRectGetHeight(watchedIcon.frame));
[albumDetailView addSubview:watchedIcon];
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that this would break in reused headers

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a fixup to always add the UIImageView and then hide/unhide. Is this what you had in mind?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, correct.

But I also see that other subviews are always created, although normally you'd create them once and then receive them from a reused cell / header / footer. Maybe their container is anyways re-created? That's not really good, but out of scope of this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I also saw this when reading your comment. I am not sure, if the headers are even reused. I can look into this at a later point in time.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw it's called from viewForHeader, so it can be reused

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So we can make this more efficient by using dequeueing, but as it is not implement now we have no problem. Correct?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, seems so

@wutschel
Copy link
Collaborator Author

Squashed and rebased.

@kambala-decapitator kambala-decapitator merged commit 5306a5a into xbmc:master Jun 14, 2024
@wutschel wutschel deleted the feature_season_watched branch June 14, 2024 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants