-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix crash deleting video refreshing #5116
Fix crash deleting video refreshing #5116
Conversation
override fun equals(other: Any?): Boolean { | ||
if (other == null || other !is PlaylistStreamEntry || streamEntity != other.streamEntity || | ||
progressTime != other.progressTime || streamId != other.streamId || joinIndex != other.joinIndex | ||
) return false | ||
|
||
return true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
override fun equals(other: Any?): Boolean { | |
if (other == null || other !is PlaylistStreamEntry || streamEntity != other.streamEntity || | |
progressTime != other.progressTime || streamId != other.streamId || joinIndex != other.joinIndex | |
) return false | |
return true | |
} | |
override fun equals(other: Any?): Boolean = | |
!(other == null || other !is PlaylistStreamEntry || streamEntity != other.streamEntity || | |
progressTime != other.progressTime || streamId != other.streamId || joinIndex != other.joinIndex) |
Edit: ignore this suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Just one minor nit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't a data class
be used? You mention that you just compare all fields, which the default generated method from Android Studio should also do, which in turn is implicitly generated in data classes
@XiangRongLin I missed that. @hlloreda ignore my suggestion and try @XiangRongLin's one. |
Indeed, it seems better. So to be sure to follow @XiangRongLin completely, the idea would be to change the current constructor to initialise a 'data' attribute which would be a data class containing all the current attributes or you mean to simply define the 'PlaylistStreamEntry' class as a 'data class' ? |
@hlloreda This. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you for the contribution :-D |
What is it?
Description of the changes in your PR
Fixes the following issue(s)
APK testing
app-deleting-video-refreshing-crashfix.zip
Due diligence