Skip to content

Commit

Permalink
feat: supported Sharkey
Browse files Browse the repository at this point in the history
closed #2017
  • Loading branch information
pantasystem committed Apr 20, 2024
1 parent e6e22d4 commit 33c6014
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ sealed class ResultState<out T>(val content: StateContent<T>) {

class Fixed<out T>(content: StateContent<T>) : ResultState<T>(content)
class Loading<out T>(content: StateContent<T>) : ResultState<T>(content)
class Error<out T>(content: StateContent<T>, val throwable: Throwable) : ResultState<T>(content)
class Error<out T>(content: StateContent<T>, val throwable: Throwable) : ResultState<T>(content) {
override fun toString(): String {
return "Error(content=$content, throwable=$throwable)"
}
}

fun<O> convert(converter: (T)->O) : ResultState<O> {
val content = when(this.content) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ data class NodeInfo(

val type = when(software.name) {
"calckey" -> SoftwareType.Misskey.Calckey(version = software.version, name = software.name)
"misskey" -> SoftwareType.Misskey.Normal(version = software.version, name = software.name)
"misskey", "sharkey" -> SoftwareType.Misskey.Normal(version = software.version, name = software.name)
"mastodon" -> SoftwareType.Mastodon.Normal(version = software.version, name = software.name)
"fedibird" -> SoftwareType.Mastodon.Fedibird(version = software.version, name = software.name)
"meisskey" -> SoftwareType.Misskey.Meisskey(version = software.version, name = software.name)
Expand Down

0 comments on commit 33c6014

Please sign in to comment.