mirror of
				https://github.com/InsanusMokrassar/TelegramBotAPI.git
				synced 2025-10-30 19:50:12 +00:00 
			
		
		
		
	all fields in text sources are lazy
This commit is contained in:
		| @@ -8,7 +8,7 @@ class BoldTextSource( | |||||||
|     source: String, |     source: String, | ||||||
|     textParts: List<TextPart> |     textParts: List<TextPart> | ||||||
| ) : MultilevelTextSource { | ) : MultilevelTextSource { | ||||||
|     override val textParts: List<TextPart> = source.fullListOfSubSource(textParts) |     override val textParts: List<TextPart> by lazy { source.fullListOfSubSource(textParts) } | ||||||
|     override val asMarkdownSource: String by lazy { source.boldMarkdown() } |     override val asMarkdownSource: String by lazy { source.boldMarkdown() } | ||||||
|     override val asMarkdownV2Source: String by lazy { boldMarkdownV2() } |     override val asMarkdownV2Source: String by lazy { boldMarkdownV2() } | ||||||
|     override val asHtmlSource: String by lazy { boldHTML() } |     override val asHtmlSource: String by lazy { boldHTML() } | ||||||
|   | |||||||
| @@ -15,9 +15,11 @@ class HashTagTextSource( | |||||||
|     source: String, |     source: String, | ||||||
|     textParts: List<TextPart> |     textParts: List<TextPart> | ||||||
| ) : MultilevelTextSource { | ) : MultilevelTextSource { | ||||||
|     override val textParts: List<TextPart> = source.withoutSharp.fullListOfSubSource( |     override val textParts: List<TextPart> by lazy { | ||||||
|  |         source.withoutSharp.fullListOfSubSource( | ||||||
|             textParts.shiftSourcesToTheLeft(1) |             textParts.shiftSourcesToTheLeft(1) | ||||||
|         ) |         ) | ||||||
|  |     } | ||||||
|     override val asMarkdownSource: String by lazy { source.hashTagMarkdown() } |     override val asMarkdownSource: String by lazy { source.hashTagMarkdown() } | ||||||
|     override val asMarkdownV2Source: String by lazy { hashTagMarkdownV2() } |     override val asMarkdownV2Source: String by lazy { hashTagMarkdownV2() } | ||||||
|     override val asHtmlSource: String by lazy { hashTagHTML() } |     override val asHtmlSource: String by lazy { hashTagHTML() } | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ class ItalicTextSource( | |||||||
|     source: String, |     source: String, | ||||||
|     textParts: List<TextPart> |     textParts: List<TextPart> | ||||||
| ) : MultilevelTextSource { | ) : MultilevelTextSource { | ||||||
|     override val textParts: List<TextPart> = source.fullListOfSubSource(textParts) |     override val textParts: List<TextPart> by lazy { source.fullListOfSubSource(textParts) } | ||||||
|     override val asMarkdownSource: String by lazy { source.italicMarkdown() } |     override val asMarkdownSource: String by lazy { source.italicMarkdown() } | ||||||
|     override val asMarkdownV2Source: String by lazy { italicMarkdownV2() } |     override val asMarkdownV2Source: String by lazy { italicMarkdownV2() } | ||||||
|     override val asHtmlSource: String by lazy { italicHTML() } |     override val asHtmlSource: String by lazy { italicHTML() } | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ class PhoneNumberTextSource( | |||||||
|     source: String, |     source: String, | ||||||
|     textParts: List<TextPart> |     textParts: List<TextPart> | ||||||
| ) : MultilevelTextSource { | ) : MultilevelTextSource { | ||||||
|     override val textParts: List<TextPart> = source.fullListOfSubSource(textParts) |     override val textParts: List<TextPart> by lazy { source.fullListOfSubSource(textParts) } | ||||||
|     override val asMarkdownSource: String by lazy { source.phoneMarkdown() } |     override val asMarkdownSource: String by lazy { source.phoneMarkdown() } | ||||||
|     override val asMarkdownV2Source: String by lazy { phoneMarkdownV2() } |     override val asMarkdownV2Source: String by lazy { phoneMarkdownV2() } | ||||||
|     override val asHtmlSource: String by lazy { phoneHTML() } |     override val asHtmlSource: String by lazy { phoneHTML() } | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ class StrikethroughTextSource( | |||||||
|     source: String, |     source: String, | ||||||
|     textParts: List<TextPart> |     textParts: List<TextPart> | ||||||
| ) : MultilevelTextSource { | ) : MultilevelTextSource { | ||||||
|     override val textParts: List<TextPart> = source.fullListOfSubSource(textParts) |     override val textParts: List<TextPart> by lazy { source.fullListOfSubSource(textParts) } | ||||||
|     override val asHtmlSource: String by lazy { strikethroughHTML() } |     override val asHtmlSource: String by lazy { strikethroughHTML() } | ||||||
|     override val asMarkdownV2Source: String by lazy { strikethroughMarkdownV2() } |     override val asMarkdownV2Source: String by lazy { strikethroughMarkdownV2() } | ||||||
|     override val asMarkdownSource: String by lazy { source.strikethroughMarkdown() } |     override val asMarkdownSource: String by lazy { source.strikethroughMarkdown() } | ||||||
|   | |||||||
| @@ -8,7 +8,7 @@ class UnderlineTextSource( | |||||||
|     source: String, |     source: String, | ||||||
|     textParts: List<TextPart> |     textParts: List<TextPart> | ||||||
| ) : MultilevelTextSource { | ) : MultilevelTextSource { | ||||||
|     override val textParts: List<TextPart> = source.fullListOfSubSource(textParts) |     override val textParts: List<TextPart> by lazy { source.fullListOfSubSource(textParts) } | ||||||
|     override val asMarkdownSource: String by lazy { source.underlineMarkdown() } |     override val asMarkdownSource: String by lazy { source.underlineMarkdown() } | ||||||
|     override val asMarkdownV2Source: String by lazy { underlineMarkdownV2() } |     override val asMarkdownV2Source: String by lazy { underlineMarkdownV2() } | ||||||
|     override val asHtmlSource: String by lazy { underlineHTML() } |     override val asHtmlSource: String by lazy { underlineHTML() } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user