aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-30 11:14:12 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-30 11:14:12 +0200
commit86d228bfc3e9c81c011c31bc81a908a21f975bfb (patch)
tree531964e8ccc8cd0ce74bb20da95553a235a711c5
parent7b1cbb86ac2cc0843312ddb81c7ca4d9f137c660 (diff)
Attempt to fix crash
-rw-r--r--TODO3
-rw-r--r--src/Body.cpp2
-rw-r--r--src/ImageViewer.cpp2
3 files changed, 4 insertions, 3 deletions
diff --git a/TODO b/TODO
index 0f1bd77..553abe1 100644
--- a/TODO
+++ b/TODO
@@ -49,4 +49,5 @@ Sanitize check: do not allow pasting more than 2gb of text.
Add search bar for matrix rooms.
Put rooms with recent messages at the top and the ones that mention us further at the top (matrix).
Allow setting matrix room priority (if it should always be at top).
-Use Entry instead of SearchBar for 4chan commenting as well. \ No newline at end of file
+Use Entry instead of SearchBar for 4chan commenting as well.
+Only add related videos to recommendations if its the first time we watch the video. This is to prevent rewatching a video multiple times from messing up recommendations. \ No newline at end of file
diff --git a/src/Body.cpp b/src/Body.cpp
index 7af2b49..718baee 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -331,7 +331,7 @@ namespace QuickMedia {
assert(!loading_thumbnail);
loading_thumbnail = true;
- load_thumbnail_future = std::async(std::launch::async, [this, url, local, thumbnail_resize_target_size, thumbnail_data]() {
+ load_thumbnail_future = std::async(std::launch::async, [this, url, local, thumbnail_resize_target_size, thumbnail_data]() mutable {
// TODO: Use sha256 instead of base64_url encoding
Path thumbnail_path = get_cache_dir().join("thumbnails").join(base64_url::encode(url));
diff --git a/src/ImageViewer.cpp b/src/ImageViewer.cpp
index c929086..e005337 100644
--- a/src/ImageViewer.cpp
+++ b/src/ImageViewer.cpp
@@ -40,7 +40,7 @@ namespace QuickMedia {
image_data->texture.setSmooth(true);
assert(!loading_image);
loading_image = true;
- image_loader_thread = std::thread([this, image_data, path]() {
+ image_loader_thread = std::thread([this, image_data, path]() mutable {
auto image = std::make_unique<sf::Image>();
if(image->loadFromFile(path.data)) {
image_data->image = std::move(image);