diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-08-16 21:13:24 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-08-16 21:13:24 +0200 |
commit | 5cc735b22570f1667d62958e59ce4910b529f5af (patch) | |
tree | 75128a8926a48a612bc892d266032bd7afd9c2cf /src/plugins/Matrix.cpp | |
parent | de4825e548b990493b372237cbef9a790bf114c4 (diff) |
Add MyAnimeList (wip)
Diffstat (limited to 'src/plugins/Matrix.cpp')
-rw-r--r-- | src/plugins/Matrix.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index fce4135..775d172 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -1173,6 +1173,7 @@ namespace QuickMedia { assert(!this->delegate); assert(!access_token.empty()); // Need to be logged in + assert(delegate); this->delegate = delegate; Path matrix_cache_dir = get_cache_dir().join("matrix"); @@ -2033,13 +2034,11 @@ namespace QuickMedia { } } - if(delegate) { - bool cache_sync = sync_is_cache; - bool is_initial_sync = next_batch.empty(); - ui_thread_tasks.push([this, room_data, cache_sync, new_messages{std::move(new_messages)}, is_initial_sync, message_dir]{ - delegate->room_add_new_messages(room_data, new_messages, is_initial_sync, cache_sync, message_dir); - }); - } + bool cache_sync = sync_is_cache; + bool is_initial_sync = next_batch.empty(); + ui_thread_tasks.push([this, room_data, cache_sync, new_messages{std::move(new_messages)}, is_initial_sync, message_dir]{ + delegate->room_add_new_messages(room_data, new_messages, is_initial_sync, cache_sync, message_dir); + }); return num_new_messages; } |