Skip to content

Commit

Permalink
Technical: Update ktlint to 1.4.1 (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanniktech authored Nov 28, 2024
1 parent 5ad2381 commit 93f7b74
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
ktlint = "1.2.1"
ktlint = "1.4.1"
ktor = "3.0.1"
kotlin = "2.1.0"
java = "19"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,11 @@ internal class InAppProducts : CoreCommand() {
return false
}

private fun resourcePrefix(app: App, inAppProduct: InAppProduct) =
"${app.name.snakecase()}_inapp_${inAppProduct.sku}_"
private fun resourcePrefix(app: App, inAppProduct: InAppProduct) = "${app.name.snakecase()}_inapp_${inAppProduct.sku}_"

private fun resourceTitle(app: App, inAppProduct: InAppProduct) =
"${resourcePrefix(app, inAppProduct)}title"
private fun resourceTitle(app: App, inAppProduct: InAppProduct) = "${resourcePrefix(app, inAppProduct)}title"

private fun resourceDescription(app: App, inAppProduct: InAppProduct) =
"${resourcePrefix(app, inAppProduct)}description"
private fun resourceDescription(app: App, inAppProduct: InAppProduct) = "${resourcePrefix(app, inAppProduct)}description"

private fun writeStringsFile(
app: App,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ class SlackNotifier<Configuration : SlackNotifierConfiguration>(
private val json = Json
private val httpClient = HttpClient(OkHttp.create())

override fun name() =
"Slack"
override fun name() = "Slack"

override fun emoji() =
"""📱"""
override fun emoji() = """📱"""

override suspend fun notify(payload: SlackNotifierPayload) {
httpClient.post(configuration.hook) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@ class TelegramBotNotifier<Configuration : TelegramBotNotifierConfiguration>(
private val json = Json
private val httpClient = HttpClient(OkHttp.create())

override fun name() =
"Telegram Bot"
override fun name() = "Telegram Bot"

override fun emoji() =
"""✈️ """
override fun emoji() = """✈️ """

override suspend fun notify(payload: TelegramBotNotifierPayload) {
httpClient.post("https://api.telegram.org/bot${configuration.botToken}/sendMessage") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package de.belabs.appstatistics.storereviews

internal fun NotifierReviewFilter?.matches(review: Review) =
this == null || languages.orEmpty().any { languageFilter ->
review.language.orEmpty().lowercase()
.startsWith(languageFilter.lowercase())
}
internal fun NotifierReviewFilter?.matches(review: Review) = this == null || languages.orEmpty().any { languageFilter ->
review.language.orEmpty().lowercase()
.startsWith(languageFilter.lowercase())
}

0 comments on commit 93f7b74

Please sign in to comment.