diff options
Diffstat (limited to 'src/QuickMedia.cpp')
-rw-r--r-- | src/QuickMedia.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 4f2fa99..c533186 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -3800,22 +3800,14 @@ namespace QuickMedia { if(!sync_running && sync_timer.getElapsedTime().asMilliseconds() >= sync_min_time_ms) { fprintf(stderr, "Time since last sync: %d ms\n", sync_timer.getElapsedTime().asMilliseconds()); - // TODO: What if the server just always responds immediately? - sync_min_time_ms = 50; + sync_min_time_ms = 1000; sync_running = true; sync_timer.restart(); - sync_future = std::async(std::launch::async, [this, synced]() { + sync_future = std::async(std::launch::async, [this]() { SyncFutureResult result; if(matrix->sync(result.room_sync_messages) == PluginResult::OK) { fprintf(stderr, "Synced matrix\n"); - - if(!synced) { - if(matrix->get_joined_rooms(result.rooms) != PluginResult::OK) { - show_notification("QuickMedia", "Failed to get a list of joined rooms", Urgency::CRITICAL); - current_page = PageType::EXIT; - return result; - } - } + matrix->get_room_join_updates(result.rooms); } else { fprintf(stderr, "Failed to sync matrix\n"); } |