From 8373529c761a58a06a00542bb29ad71709af42e3 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 17:41:47 +0000 Subject: [PATCH] fix(app): sequence user list loading after profile relays are initialized Prior to this change, user-specific lists (block lists, subscriptions, hashtag preferences, DMs, NWC settings) were fetched concurrently with the profile/relay initialization in `handleAuthLogin`. This caused a race condition where the application would attempt to fetch sensitive user data using default relays instead of the user's preferred relays, often resulting in empty or stale data. This patch refactors `handleAuthLogin` in `js/app.js` to chain the loading of these lists to the completion of `profileStatePromise` (which ensures relays are loaded via `postLoginPromise`). This guarantees that the correct relays are used for fetching user-specific data. Also defines `dmStatePromise`, `nwcPromise` and `hashtagPreferencesPromise` which were previously referenced but seemingly undefined in the scope, ensuring proper promise tracking. Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com>