Fix style issues

This commit is contained in:
Stypox 2020-06-28 22:55:18 +02:00
parent 13c0fdef08
commit 248212588d
No known key found for this signature in database
GPG Key ID: 4BDF1B40A49FDD23
2 changed files with 7 additions and 12 deletions

View File

@ -577,20 +577,15 @@ public abstract class Tab {
@Override
public boolean equals(final Object obj) {
final boolean baseEquals = super.equals(obj)
if (!(super.equals(obj)
&& Objects.equals(playlistType, ((PlaylistTab) obj).playlistType)
&& Objects.equals(playlistName, ((PlaylistTab) obj).playlistName);
if (!baseEquals) {
return false;
&& Objects.equals(playlistName, ((PlaylistTab) obj).playlistName))) {
return false; // base objects are different
}
final boolean localPlaylistEquals = playlistId == ((PlaylistTab) obj).playlistId;
final boolean remotePlaylistEquals =
playlistServiceId == ((PlaylistTab) obj).playlistServiceId
&& Objects.equals(playlistUrl, ((PlaylistTab) obj).playlistUrl);
return localPlaylistEquals || remotePlaylistEquals;
return (playlistId == ((PlaylistTab) obj).playlistId) // local
|| (playlistServiceId == ((PlaylistTab) obj).playlistServiceId // remote
&& Objects.equals(playlistUrl, ((PlaylistTab) obj).playlistUrl));
}
public int getPlaylistServiceId() {

View File

@ -653,5 +653,5 @@
<string name="detail_sub_channel_thumbnail_view_description">Channel\'s avatar thumbnail</string>
<string name="channel_created_by">Created by %s</string>
<string name="video_detail_by">By %s</string>
<string name="playlist_page_summary">Playlist Page</string>
<string name="playlist_page_summary">Playlist page</string>
</resources>