diff --git a/lib/main.dart b/lib/main.dart index 374368a8..7c4e1fff 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -330,6 +330,8 @@ Future initRelays({bool newKey = false}) async { if (settingProvider.gossip == 1) { feedRelaySet = relayManager.getRelaySet("feed", loggedUserSigner!.getPublicKey()); if (feedRelaySet == null) { + EasyLoading.showToast("Calculating feed relays from contact's outboxes...", dismissOnTap: true, duration: const Duration(seconds: 15), maskType: EasyLoadingMaskType.black); + feedRelaySet = await relayManager.calculateRelaySet( name: "feed", ownerPubKey: loggedUserSigner!.getPublicKey(), diff --git a/lib/router/index/account_manager_component.dart b/lib/router/index/account_manager_component.dart index e4953411..3bd2ce1d 100644 --- a/lib/router/index/account_manager_component.dart +++ b/lib/router/index/account_manager_component.dart @@ -143,7 +143,7 @@ class AccountsState extends State { } static void doLogin() async { - EasyLoading.show(status: "Logging in...",maskType: EasyLoadingMaskType.black); + EasyLoading.show(status: "Logging in...",maskType: EasyLoadingMaskType.black, dismissOnTap: true); String? key = settingProvider.key; bool isPrivate = settingProvider.isPrivateKey; @@ -152,9 +152,9 @@ class AccountsState extends State { ? Bip340EventSigner(isPrivate ? key : null, publicKey) : Nip07EventSigner(await js.getPublicKeyAsync()); - await initRelays(newKey: false); - followEventProvider.loadCachedFeed(); + await followEventProvider.loadCachedFeed(); + initRelays(newKey: false); notificationsProvider.notifyListeners(); nwcProvider.init(); settingProvider.notifyListeners(); diff --git a/lib/router/login/login_router.dart b/lib/router/login/login_router.dart index 4fcc567b..a816aba2 100644 --- a/lib/router/login/login_router.dart +++ b/lib/router/login/login_router.dart @@ -415,7 +415,7 @@ class _LoginRouter extends State } Future initRelayManager( String publicKey, bool newKey) async { - EasyLoading.showToast("Relaying other stuff...", dismissOnTap: true, duration: const Duration(seconds: 5), maskType: EasyLoadingMaskType.black); + EasyLoading.showToast("Relaying other stuff...", dismissOnTap: true, duration: const Duration(seconds: 15), maskType: EasyLoadingMaskType.black); await initRelays(newKey: newKey); followEventProvider.loadCachedFeed(); nwcProvider.init(); diff --git a/lib/router/relays/relays_item_component.dart b/lib/router/relays/relays_item_component.dart index b3e6f737..c3ab063a 100644 --- a/lib/router/relays/relays_item_component.dart +++ b/lib/router/relays/relays_item_component.dart @@ -211,7 +211,7 @@ class RelaysItemComponent extends StatelessWidget { bool finished = false; Future.delayed(const Duration(seconds: 1), () { if (!finished) { - EasyLoading.show(status: "Refreshing relay list before changing...", maskType: EasyLoadingMaskType.black); + EasyLoading.show(status: "Refreshing relay list before changing...", maskType: EasyLoadingMaskType.black, dismissOnTap: true); } }); await relayProvider.updateMarker(url, marker!); @@ -243,7 +243,7 @@ class RelaysItemComponent extends StatelessWidget { bool finished = false; Future.delayed(const Duration(seconds: 1), () { if (!finished) { - EasyLoading.show(status: "Refreshing relay list before changing...", maskType: EasyLoadingMaskType.black); + EasyLoading.show(status: "Refreshing relay list before changing...", maskType: EasyLoadingMaskType.black, dismissOnTap: true); } }); await relayProvider.updateMarker(url, marker!); @@ -272,7 +272,7 @@ class RelaysItemComponent extends StatelessWidget { bool finished = false; Future.delayed(const Duration(seconds: 1), () { if (!finished) { - EasyLoading.show(status: "Refreshing relay list before removing...", maskType: EasyLoadingMaskType.black); + EasyLoading.show(status: "Refreshing relay list before removing...", maskType: EasyLoadingMaskType.black, dismissOnTap: true); } }); await relayProvider.removeRelay(url);