style: apply ktlint formatting fixes

https://claude.ai/code/session_01HeWiRdKDTnMGfEBUegk3d1
This commit is contained in:
Claude
2026-03-17 03:43:19 +00:00
parent 1c4f9769b1
commit 883a2f995e
11 changed files with 40 additions and 24 deletions
@@ -119,11 +119,12 @@ object ShareHelper {
bytesRead >= 12 && matchesMagicNumbers(header, 4, MOV_FTYP) -> detectMp4OrMov(header)
// MP4/MOV alternative: moov, mdat, or free at offset 4
bytesRead >= 8 && (
matchesMagicNumbers(header, 4, MOV_MOOV) ||
matchesMagicNumbers(header, 4, MOV_MDAT) ||
matchesMagicNumbers(header, 4, MOV_FREE)
) -> "mp4"
bytesRead >= 8 &&
(
matchesMagicNumbers(header, 4, MOV_MOOV) ||
matchesMagicNumbers(header, 4, MOV_MDAT) ||
matchesMagicNumbers(header, 4, MOV_FREE)
) -> "mp4"
else -> defaultExtension
}
@@ -297,8 +297,10 @@ fun ChessLobbyContent(
val userPubkey = accountViewModel.account.userProfile().pubkeyHex
val hasContent =
activeGames.isNotEmpty() || spectatingGames.isNotEmpty() ||
publicGames.isNotEmpty() || challenges.isNotEmpty()
activeGames.isNotEmpty() ||
spectatingGames.isNotEmpty() ||
publicGames.isNotEmpty() ||
challenges.isNotEmpty()
if (!hasContent) {
// Empty state - use LazyColumn so pull-to-refresh works
@@ -83,7 +83,8 @@ class HashtagFeedFilter(
event is PrivateDmEvent ||
event is PollNoteEvent ||
event is AudioHeaderEvent
) && event.isTaggedHash(hashTag)
) &&
event.isTaggedHash(hashTag)
fun acceptableViaScope(
event: Event?,
@@ -1047,7 +1047,8 @@ open class ShortNotePostViewModel :
(
!wantsPoll ||
(
pollOptions.isNotEmpty() && pollOptions.all { it.value.label.isNotEmpty() } &&
pollOptions.isNotEmpty() &&
pollOptions.all { it.value.label.isNotEmpty() } &&
closedAt > TimeUtils.oneMinuteFromNow()
)
) &&
@@ -77,12 +77,13 @@ class UserProfileGalleryFeedFilter(
val noteEvent = it.event
return (
(
it.event?.pubKey == user.pubkeyHex && (
noteEvent is PictureEvent ||
noteEvent is RegularVideoEvent ||
(noteEvent is ReplaceableVideoEvent && it is AddressableNote) ||
(noteEvent is ProfileGalleryEntryEvent && noteEvent.hasUrl() && noteEvent.hasFromEvent())
)
it.event?.pubKey == user.pubkeyHex &&
(
noteEvent is PictureEvent ||
noteEvent is RegularVideoEvent ||
(noteEvent is ReplaceableVideoEvent && it is AddressableNote) ||
(noteEvent is ProfileGalleryEntryEvent && noteEvent.hasUrl() && noteEvent.hasFromEvent())
)
) // && noteEvent.isOneOf(SUPPORTED_VIDEO_FEED_MIME_TYPES_SET))
) &&
params.match(noteEvent, it.relays) &&
@@ -345,8 +345,11 @@ private fun ChessLobby(
listState: LazyListState = rememberLazyListState(),
) {
val hasContent =
activeGames.isNotEmpty() || spectatingGames.isNotEmpty() ||
publicGames.isNotEmpty() || challenges.isNotEmpty() || completedGames.isNotEmpty()
activeGames.isNotEmpty() ||
spectatingGames.isNotEmpty() ||
publicGames.isNotEmpty() ||
challenges.isNotEmpty() ||
completedGames.isNotEmpty()
if (!hasContent) {
// Empty state
@@ -678,7 +678,8 @@ class QueryBuilder(
val search: String? = null,
) {
fun isSimpleSearch() =
search != null && search.isNotEmpty() &&
search != null &&
search.isNotEmpty() &&
(nonDTagsIn == null || nonDTagsIn.isEmpty()) &&
(nonDTagsAll == null || nonDTagsAll.isEmpty())
@@ -301,7 +301,8 @@ class NamecoinNameResolver(
pubkey = rootMatch.content
}
firstEntry != null && firstEntry.value is JsonPrimitive &&
firstEntry != null &&
firstEntry.value is JsonPrimitive &&
isValidPubkey((firstEntry.value as JsonPrimitive).content) -> {
resolvedLocalPart = firstEntry.key
pubkey = (firstEntry.value as JsonPrimitive).content
@@ -217,9 +217,12 @@ object ChessStateReconstructor {
return fen1 == fen2 // Fallback to exact match
}
return parts1[0] == parts2[0] && // Board position
parts1[1] == parts2[1] && // Active color
parts1[2] == parts2[2] && // Castling rights
return parts1[0] == parts2[0] &&
// Board position
parts1[1] == parts2[1] &&
// Active color
parts1[2] == parts2[2] &&
// Castling rights
parts1[3] == parts2[3] // En passant
}
@@ -212,7 +212,8 @@ actual class ChessEngine {
board.getPiece(toSquare) != Piece.NONE ||
(
pt == com.github.bhlangonijr.chesslib.PieceType.PAWN &&
epTarget != Square.NONE && toSquare == epTarget
epTarget != Square.NONE &&
toSquare == epTarget
)
if (pt != com.github.bhlangonijr.chesslib.PieceType.PAWN) {
@@ -261,7 +261,8 @@ class NamecoinNameResolverTest {
pubkey = rootMatch.content
}
firstEntry != null && firstEntry.value is kotlinx.serialization.json.JsonPrimitive &&
firstEntry != null &&
firstEntry.value is kotlinx.serialization.json.JsonPrimitive &&
(firstEntry.value as kotlinx.serialization.json.JsonPrimitive)
.content
.matches(Regex("^[0-9a-fA-F]{64}$")) -> {