chore: Lint code

This commit is contained in:
inotia00 2025-01-22 17:20:21 +09:00
parent 305eba75cd
commit 216df8935c
5 changed files with 25 additions and 9 deletions

View File

@ -243,9 +243,10 @@ public final class FeedComponentsFilter extends Filter {
if (!communityPostsFeedGroupSearch.matches(allValue) && Settings.HIDE_COMMUNITY_POSTS_CHANNEL.get()) {
return super.isFiltered(path, identifier, allValue, protobufBufferArray, matchedGroup, contentType, contentIndex);
}
if (!communityPostsFeedGroup.check(allValue).isFiltered()) {
return false;
if (communityPostsFeedGroup.check(allValue).isFiltered()) {
return super.isFiltered(path, identifier, allValue, protobufBufferArray, matchedGroup, contentType, contentIndex);
}
return false;
} else if (matchedGroup == expandableChip) {
if (path.startsWith(FEED_VIDEO_PATH)) {
return super.isFiltered(path, identifier, allValue, protobufBufferArray, matchedGroup, contentType, contentIndex);

View File

@ -169,7 +169,7 @@ public final class ReturnYouTubeDislikeFilterPatch extends Filter {
return videoId;
}
}
return null;
}
}

View File

@ -123,7 +123,10 @@ class VideoDetailsRequest private constructor(
.getJSONObject("videoDetails")
.getString("channelId")
} catch (e: JSONException) {
Logger.printException ({ "Fetch failed while processing response data for response: $videoDetailsJson" }, e)
Logger.printException(
{ "Fetch failed while processing response data for response: $videoDetailsJson" },
e
)
}
return null

View File

@ -129,7 +129,11 @@ class MusicRequest private constructor(
clientType
)
val requestBody =
PlayerRoutes.createApplicationRequestBody(clientType = clientType, videoId = videoId, playlistId = "RD$videoId")
PlayerRoutes.createApplicationRequestBody(
clientType = clientType,
videoId = videoId,
playlistId = "RD$videoId"
)
connection.setFixedLengthStreamingMode(requestBody.size)
connection.outputStream.write(requestBody)
@ -226,9 +230,14 @@ class MusicRequest private constructor(
.getJSONObject("watchEndpoint")
val playerParams: String? = watchEndpointJsonObject?.getString("playerParams")
return playerParams != null && VideoInformation.isMixPlaylistsOpenedByUser(playerParams)
return playerParams != null && VideoInformation.isMixPlaylistsOpenedByUser(
playerParams
)
} catch (e: JSONException) {
Logger.printException ({ "Fetch failed while processing Application response data for response: $playlistJson" }, e)
Logger.printException(
{ "Fetch failed while processing Application response data for response: $playlistJson" },
e
)
}
return false
@ -242,7 +251,10 @@ class MusicRequest private constructor(
.getString("category")
.equals("Music")
} catch (e: JSONException) {
Logger.printException ({ "Fetch failed while processing Web response data for response: $microFormatJson" }, e)
Logger.printException(
{ "Fetch failed while processing Web response data for response: $microFormatJson" },
e
)
}
return false

View File

@ -59,7 +59,7 @@ class ScreenBrightnessController(
*/
private var rawScreenBrightness: Float
get() = host.window.attributes.screenBrightness
private set(value) {
set(value) {
val attr = host.window.attributes
attr.screenBrightness = value
host.window.attributes = attr