chore(deps): update dependency com.facebook:ktfmt to v0.44 (#374)

* chore(deps): update dependency com.facebook:ktfmt to v0.44

* chore: reformat

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
renovate[bot] 2023-04-29 09:48:04 +05:30 committed by GitHub
parent 61a2cefcc3
commit b1a66bb8dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 4 deletions

View file

@ -46,6 +46,6 @@ class SpotlessPlugin : Plugin<Project> {
} }
private companion object { private companion object {
private const val KTFMT_VERSION = "0.43" private const val KTFMT_VERSION = "0.44"
} }
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright © 2021-2022 Harsh Shandilya. * Copyright © 2021-2023 Harsh Shandilya.
* Use of this source code is governed by an MIT-style * Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT. * https://opensource.org/licenses/MIT.
@ -8,6 +8,8 @@ package dev.msfjarvis.claw.common
internal sealed class NetworkState { internal sealed class NetworkState {
class Success<T>(val data: T) : NetworkState() class Success<T>(val data: T) : NetworkState()
class Error(val error: Throwable, val description: String) : NetworkState() class Error(val error: Throwable, val description: String) : NetworkState()
object Loading : NetworkState() object Loading : NetworkState()
} }

View file

@ -258,9 +258,13 @@ fun LobstersCardPreview() {
postActions = postActions =
object : PostActions { object : PostActions {
override fun viewPost(postUrl: String, commentsUrl: String) {} override fun viewPost(postUrl: String, commentsUrl: String) {}
override fun viewComments(postId: String) {} override fun viewComments(postId: String) {}
override fun viewCommentsPage(commentsUrl: String) {} override fun viewCommentsPage(commentsUrl: String) {}
override fun toggleSave(post: SavedPost) {} override fun toggleSave(post: SavedPost) {}
override suspend fun getComments(postId: String): LobstersPostDetails { override suspend fun getComments(postId: String): LobstersPostDetails {
return LobstersPostDetails( return LobstersPostDetails(
shortId = "ooga", shortId = "ooga",
@ -275,6 +279,7 @@ fun LobstersCardPreview() {
comments = emptyList(), comments = emptyList(),
) )
} }
override suspend fun getLinkMetadata(url: String): LinkMetadata { override suspend fun getLinkMetadata(url: String): LinkMetadata {
return LinkMetadata("", "", "") return LinkMetadata("", "", "")
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright © 2021-2022 Harsh Shandilya. * Copyright © 2021-2023 Harsh Shandilya.
* Use of this source code is governed by an MIT-style * Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT. * https://opensource.org/licenses/MIT.
@ -14,9 +14,14 @@ import dev.msfjarvis.claw.model.LobstersPostDetails
@Stable @Stable
interface PostActions { interface PostActions {
fun viewPost(postUrl: String, commentsUrl: String) fun viewPost(postUrl: String, commentsUrl: String)
fun viewComments(postId: String) fun viewComments(postId: String)
fun viewCommentsPage(commentsUrl: String) fun viewCommentsPage(commentsUrl: String)
fun toggleSave(post: SavedPost) fun toggleSave(post: SavedPost)
suspend fun getComments(postId: String): LobstersPostDetails suspend fun getComments(postId: String): LobstersPostDetails
suspend fun getLinkMetadata(url: String): LinkMetadata suspend fun getLinkMetadata(url: String): LinkMetadata
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright © 2022 Harsh Shandilya. * Copyright © 2022-2023 Harsh Shandilya.
* Use of this source code is governed by an MIT-style * Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at * license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT. * https://opensource.org/licenses/MIT.
@ -18,9 +18,13 @@ import kotlinx.coroutines.ExperimentalCoroutinesApi
interface DispatcherProvider { interface DispatcherProvider {
fun main(): CoroutineDispatcher = Dispatchers.Main fun main(): CoroutineDispatcher = Dispatchers.Main
fun default(): CoroutineDispatcher = Dispatchers.Default fun default(): CoroutineDispatcher = Dispatchers.Default
fun io(): CoroutineDispatcher = Dispatchers.IO fun io(): CoroutineDispatcher = Dispatchers.IO
fun unconfined(): CoroutineDispatcher = Dispatchers.Unconfined fun unconfined(): CoroutineDispatcher = Dispatchers.Unconfined
fun database(): CoroutineDispatcher = Dispatchers.IO.limitedParallelism(1) fun database(): CoroutineDispatcher = Dispatchers.IO.limitedParallelism(1)
} }

View file

@ -17,6 +17,7 @@ import java.util.UUID
class PostCommentsQueriesTest : FunSpec() { class PostCommentsQueriesTest : FunSpec() {
private lateinit var postQueries: PostCommentsQueries private lateinit var postQueries: PostCommentsQueries
init { init {
beforeEach { beforeEach {
val driver = JdbcSqliteDriver(JdbcSqliteDriver.IN_MEMORY) val driver = JdbcSqliteDriver(JdbcSqliteDriver.IN_MEMORY)