Make telegram blue text more readable on dark themes. Fixes #729

This commit is contained in:
Tulir Asokan
2022-01-08 23:27:57 +02:00
parent 9f48eca5a6
commit 63fafec1b7
2 changed files with 8 additions and 4 deletions
+1
View File
@@ -3,6 +3,7 @@
* Added support for message reactions.
* Added support for spoiler text.
* Improved support for voice messages.
* Improved color of blue text from Telegram to be more readable on dark themes.
* Fixed syncing contacts throwing an error for new accounts.
* Fixed migrating from the legacy database if the database schema had been
corrupted (e.g. by using 3rd party tools for SQLite -> Postgres migration).
+7 -4
View File
@@ -290,10 +290,13 @@ async def _telegram_entities_to_matrix(
skip_entity = await _parse_url(
html, entity_text, entity.url if entity_type == MessageEntityTextUrl else None
)
elif entity_type == MessageEntityBotCommand:
html.append(f"<font color='blue'>{entity_text}</font>")
elif entity_type in (MessageEntityHashtag, MessageEntityCashtag, MessageEntityPhone):
html.append(f"<font color='blue'>{entity_text}</font>")
elif entity_type in (
MessageEntityBotCommand,
MessageEntityHashtag,
MessageEntityCashtag,
MessageEntityPhone,
):
html.append(f"<font color='#3771bb'>{entity_text}</font>")
elif entity_type == MessageEntitySpoiler:
html.append(f"<span data-mx-spoiler>{entity_text}</span>")
else: