mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-04 15:33:47 +00:00
remove WithLanguageCode
This commit is contained in:
parent
95abc72bf3
commit
142fae1ede
@ -9,9 +9,3 @@ interface WithOptionalLanguageCode {
|
|||||||
get() = ietfLanguageCode ?.code
|
get() = ietfLanguageCode ?.code
|
||||||
}
|
}
|
||||||
|
|
||||||
interface WithLanguageCode : WithOptionalLanguageCode {
|
|
||||||
override val ietfLanguageCode: IetfLanguageCode
|
|
||||||
|
|
||||||
override val languageCode: String
|
|
||||||
get() = ietfLanguageCode.code
|
|
||||||
}
|
|
@ -23,7 +23,6 @@ import dev.inmo.tgbotapi.types.InlineQueries.InputMessageContent.*
|
|||||||
import dev.inmo.tgbotapi.types.InlineQueries.query.*
|
import dev.inmo.tgbotapi.types.InlineQueries.query.*
|
||||||
import dev.inmo.tgbotapi.types.InputMedia.*
|
import dev.inmo.tgbotapi.types.InputMedia.*
|
||||||
import dev.inmo.tgbotapi.types.MessageEntity.textsources.*
|
import dev.inmo.tgbotapi.types.MessageEntity.textsources.*
|
||||||
import dev.inmo.tgbotapi.types.abstracts.WithLanguageCode
|
|
||||||
import dev.inmo.tgbotapi.types.abstracts.WithOptionalLanguageCode
|
import dev.inmo.tgbotapi.types.abstracts.WithOptionalLanguageCode
|
||||||
import dev.inmo.tgbotapi.types.actions.*
|
import dev.inmo.tgbotapi.types.actions.*
|
||||||
import dev.inmo.tgbotapi.types.buttons.*
|
import dev.inmo.tgbotapi.types.buttons.*
|
||||||
@ -3117,12 +3116,3 @@ inline fun Any.asWithOptionalLanguageCode(): WithOptionalLanguageCode? = this as
|
|||||||
|
|
||||||
@PreviewFeature
|
@PreviewFeature
|
||||||
inline fun Any.requireWithOptionalLanguageCode(): WithOptionalLanguageCode = this as WithOptionalLanguageCode
|
inline fun Any.requireWithOptionalLanguageCode(): WithOptionalLanguageCode = this as WithOptionalLanguageCode
|
||||||
|
|
||||||
@PreviewFeature
|
|
||||||
inline fun <T> Any.whenWithLanguageCode(block: (WithLanguageCode) -> T) = asWithLanguageCode() ?.let(block)
|
|
||||||
|
|
||||||
@PreviewFeature
|
|
||||||
inline fun Any.asWithLanguageCode(): WithLanguageCode? = this as? WithLanguageCode
|
|
||||||
|
|
||||||
@PreviewFeature
|
|
||||||
inline fun Any.requireWithLanguageCode(): WithLanguageCode = this as WithLanguageCode
|
|
||||||
|
Loading…
Reference in New Issue
Block a user