From 9775a6bb77930a6e3b60445675990a8c01777aea Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 25 Jul 2021 23:05:35 +0200 Subject: Temporary fix for broken body height when using embedded items (matrix replies) --- TODO | 4 +++- src/Body.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 066f811..38b126e 100644 --- a/TODO +++ b/TODO @@ -174,4 +174,6 @@ Add option to view dead link in 4chan with 4chan archive and navigate to crossbo Show latest message before sync is done for a room when the latest message is an edit. Right now it has to fetch previous messages until the first non-edit message. Allow resuming downloads. Support downloading live youtube videos. -Youtube broke age restricted video again. Need to find a fix. It kinda works in yt-dlp, but not always. \ No newline at end of file +Youtube broke age restricted video again. Need to find a fix. It kinda works in yt-dlp, but not always. +Use the new player innertube api. To make that work quickmedia will need to extract signatureTimestamp (sts) and set that in the form request. Youtube-dl does this. +Instead of resetting text items in body, add a clear function to text. That way we can easily cache the height of the text. \ No newline at end of file diff --git a/src/Body.cpp b/src/Body.cpp index 10911e4..6c2cf9e 100644 --- a/src/Body.cpp +++ b/src/Body.cpp @@ -1551,6 +1551,7 @@ namespace QuickMedia { item_height += (get_item_height(item->embedded_item.get(), embedded_item_width, load_texture, false) + 6.0f + body_spacing[body_theme].embedded_item_padding_y * 2.0f); else item_height += ((body_spacing[body_theme].embedded_item_font_size + 5.0f) + 6.0f + body_spacing[body_theme].embedded_item_padding_y * 2.0f); + has_loaded_text = true; } if(item->description_text) { item_height += item->description_text->getHeight() - 2.0f; -- cgit v1.2.3