diff --git a/lib/account/pages/login_page.dart b/lib/account/pages/login_page.dart index 171ecc69f..cc4391937 100644 --- a/lib/account/pages/login_page.dart +++ b/lib/account/pages/login_page.dart @@ -90,7 +90,7 @@ class _LoginPageState extends State with SingleTickerProviderStateMix instanceTextDebounceTimer!.cancel(); } instanceTextDebounceTimer = Timer(const Duration(milliseconds: 500), () async { - await getInstanceIcon(_instanceTextEditingController.text).then((value) { + await getInstanceInfo(_instanceTextEditingController.text).then((value) { // Make sure the icon we looked up still matches the text if (currentInstance == _instanceTextEditingController.text) { setState(() => instanceIcon = value.icon); diff --git a/lib/account/widgets/profile_modal_body.dart b/lib/account/widgets/profile_modal_body.dart index a5e5deabd..ad6615b68 100644 --- a/lib/account/widgets/profile_modal_body.dart +++ b/lib/account/widgets/profile_modal_body.dart @@ -177,144 +177,173 @@ class _ProfileSelectState extends State { context.pop(); }, borderRadius: BorderRadius.circular(50), - child: ListTile( - leading: Stack( - children: [ - AnimatedCrossFade( - crossFadeState: accounts![index].instanceIcon == null ? CrossFadeState.showFirst : CrossFadeState.showSecond, - duration: const Duration(milliseconds: 500), - firstChild: const SizedBox( - child: Padding( - padding: EdgeInsets.only(left: 8, top: 8, right: 8, bottom: 8), - child: Icon( - Icons.person, + child: AnimatedSize( + duration: const Duration(milliseconds: 250), + child: ListTile( + leading: Stack( + children: [ + AnimatedCrossFade( + crossFadeState: accounts![index].instanceIcon == null ? CrossFadeState.showFirst : CrossFadeState.showSecond, + duration: const Duration(milliseconds: 500), + firstChild: const SizedBox( + child: Padding( + padding: EdgeInsets.only(left: 8, top: 8, right: 8, bottom: 8), + child: Icon( + Icons.person, + ), ), ), - ), - secondChild: CircleAvatar( - backgroundColor: Colors.transparent, - foregroundImage: accounts![index].instanceIcon == null ? null : CachedNetworkImageProvider(accounts![index].instanceIcon!), - maxRadius: 20, - ), - ), - // This widget creates a slight border around the status indicator - Positioned( - right: 0, - bottom: 0, - child: SizedBox( - width: 12, - height: 12, - child: Material( - borderRadius: BorderRadius.circular(10), - color: currentAccountId == accounts![index].account.id ? selectedColor : null, + secondChild: CircleAvatar( + backgroundColor: Colors.transparent, + foregroundImage: accounts![index].instanceIcon == null ? null : CachedNetworkImageProvider(accounts![index].instanceIcon!), + maxRadius: 20, ), ), - ), - // This is the status indicator - Positioned( - right: 1, - bottom: 1, - child: AnimatedOpacity( - opacity: accounts![index].alive == null ? 0 : 1, - duration: const Duration(milliseconds: 500), - child: Icon( - accounts![index].alive == true ? Icons.check_circle_rounded : Icons.remove_circle_rounded, - size: 10, - color: Color.alphaBlend(theme.colorScheme.primaryContainer.withOpacity(0.6), accounts![index].alive == true ? Colors.green : Colors.red), + // This widget creates a slight border around the status indicator + Positioned( + right: 0, + bottom: 0, + child: SizedBox( + width: 12, + height: 12, + child: Material( + borderRadius: BorderRadius.circular(10), + color: currentAccountId == accounts![index].account.id ? selectedColor : null, + ), ), ), - ), - ], - ), - title: Text( - accounts![index].account.username ?? 'N/A', - style: theme.textTheme.titleMedium?.copyWith(), - ), - subtitle: Row( - children: [ - Text(accounts![index].account.instance?.replaceAll('https://', '') ?? 'N/A'), - AnimatedOpacity( - opacity: accounts![index].latency == null ? 0 : 1, - duration: const Duration(milliseconds: 500), - child: Row( - children: [ - const SizedBox(width: 5), - Text( - '•', - style: TextStyle( - color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), - ), - ), - const SizedBox(width: 5), - Text( - '${accounts![index].latency?.inMilliseconds}ms', - style: TextStyle( - color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), - ), + // This is the status indicator + Positioned( + right: 1, + bottom: 1, + child: AnimatedOpacity( + opacity: accounts![index].alive == null ? 0 : 1, + duration: const Duration(milliseconds: 500), + child: Icon( + accounts![index].alive == true ? Icons.check_circle_rounded : Icons.remove_circle_rounded, + size: 10, + color: Color.alphaBlend(theme.colorScheme.primaryContainer.withOpacity(0.6), accounts![index].alive == true ? Colors.green : Colors.red), ), - ], + ), ), - ), - ], - ), - trailing: (accounts!.length > 1 || anonymousInstances?.isNotEmpty == true) - ? (currentAccountId == accounts![index].account.id) - ? IconButton( - icon: loggingOutId == accounts![index].account.id - ? const SizedBox( - height: 20, - width: 20, - child: CircularProgressIndicator(), - ) - : Icon(Icons.logout, semanticLabel: AppLocalizations.of(context)!.logOut), - onPressed: () async { - if (await showLogOutDialog(context)) { + ], + ), + title: Text( + accounts![index].account.username ?? 'N/A', + style: theme.textTheme.titleMedium?.copyWith(), + ), + subtitle: Wrap( + children: [ + Text(accounts![index].account.instance?.replaceAll('https://', '') ?? 'N/A'), + AnimatedSize( + duration: const Duration(milliseconds: 250), + child: accounts![index].version == null + ? const SizedBox(height: 20, width: 0) + : Row( + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox(width: 5), + Text( + '•', + style: TextStyle( + color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), + ), + ), + const SizedBox(width: 5), + Text( + 'v${accounts![index].version}', + style: TextStyle( + color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), + ), + ), + ], + ), + ), + AnimatedSize( + duration: const Duration(milliseconds: 250), + child: accounts![index].latency == null + ? const SizedBox(height: 20, width: 0) + : Row( + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox(width: 5), + Text( + '•', + style: TextStyle( + color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), + ), + ), + const SizedBox(width: 5), + Text( + '${accounts![index].latency?.inMilliseconds}ms', + style: TextStyle( + color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), + ), + ), + ], + ), + ), + ], + ), + trailing: (accounts!.length > 1 || anonymousInstances?.isNotEmpty == true) + ? (currentAccountId == accounts![index].account.id) + ? IconButton( + icon: loggingOutId == accounts![index].account.id + ? const SizedBox( + height: 20, + width: 20, + child: CircularProgressIndicator(), + ) + : Icon(Icons.logout, semanticLabel: AppLocalizations.of(context)!.logOut), + onPressed: () async { + if (await showLogOutDialog(context)) { + setState(() => loggingOutId = accounts![index].account.id); + + await Future.delayed(const Duration(milliseconds: 1000), () { + if ((anonymousInstances?.length ?? 0) > 0) { + context.read().add(OnSetCurrentAnonymousInstance(anonymousInstances!.last.instance)); + context.read().add(InstanceChanged(instance: anonymousInstances!.last.instance)); + } else { + context.read().add(SwitchAccount(accountId: accounts!.lastWhere((account) => account.account.id != currentAccountId).account.id)); + } + + setState(() { + accounts = null; + loggingOutId = null; + }); + }); + } + }, + ) + : IconButton( + icon: loggingOutId == accounts![index].account.id + ? const SizedBox( + height: 20, + width: 20, + child: CircularProgressIndicator(), + ) + : Icon( + Icons.delete, + semanticLabel: AppLocalizations.of(context)!.removeAccount, + ), + onPressed: () async { + context.read().add(RemoveAccount(accountId: accounts![index].account.id)); + setState(() => loggingOutId = accounts![index].account.id); - await Future.delayed(const Duration(milliseconds: 1000), () { - if ((anonymousInstances?.length ?? 0) > 0) { - context.read().add(OnSetCurrentAnonymousInstance(anonymousInstances!.last.instance)); - context.read().add(InstanceChanged(instance: anonymousInstances!.last.instance)); - } else { - context.read().add(SwitchAccount(accountId: accounts!.lastWhere((account) => account.account.id != currentAccountId).account.id)); - } - - setState(() { - accounts = null; - loggingOutId = null; + if (currentAccountId != null) { + await Future.delayed(const Duration(milliseconds: 1000), () { + context.read().add(SwitchAccount(accountId: currentAccountId)); }); - }); - } - }, - ) - : IconButton( - icon: loggingOutId == accounts![index].account.id - ? const SizedBox( - height: 20, - width: 20, - child: CircularProgressIndicator(), - ) - : Icon( - Icons.delete, - semanticLabel: AppLocalizations.of(context)!.removeAccount, - ), - onPressed: () async { - context.read().add(RemoveAccount(accountId: accounts![index].account.id)); - - setState(() => loggingOutId = accounts![index].account.id); + } - if (currentAccountId != null) { - await Future.delayed(const Duration(milliseconds: 1000), () { - context.read().add(SwitchAccount(accountId: currentAccountId)); + setState(() { + accounts = null; + loggingOutId = null; }); - } - - setState(() { - accounts = null; - loggingOutId = null; - }); - }) - : null, + }) + : null, + ), ), ), ), @@ -336,125 +365,154 @@ class _ProfileSelectState extends State { context.pop(); }, borderRadius: BorderRadius.circular(50), - child: ListTile( - leading: Stack( - children: [ - AnimatedCrossFade( - crossFadeState: anonymousInstances![realIndex].instanceIcon == null ? CrossFadeState.showFirst : CrossFadeState.showSecond, - duration: const Duration(milliseconds: 500), - firstChild: const SizedBox( - child: Padding( - padding: EdgeInsets.only(left: 8, top: 8, right: 8, bottom: 8), - child: Icon( - Icons.language, + child: AnimatedSize( + duration: const Duration(milliseconds: 250), + child: ListTile( + leading: Stack( + children: [ + AnimatedCrossFade( + crossFadeState: anonymousInstances![realIndex].instanceIcon == null ? CrossFadeState.showFirst : CrossFadeState.showSecond, + duration: const Duration(milliseconds: 500), + firstChild: const SizedBox( + child: Padding( + padding: EdgeInsets.only(left: 8, top: 8, right: 8, bottom: 8), + child: Icon( + Icons.language, + ), ), ), - ), - secondChild: CircleAvatar( - backgroundColor: Colors.transparent, - foregroundImage: anonymousInstances![realIndex].instanceIcon == null ? null : CachedNetworkImageProvider(anonymousInstances![realIndex].instanceIcon!), - maxRadius: 20, - ), - ), - Positioned( - right: 0, - bottom: 0, - child: SizedBox( - width: 12, - height: 12, - child: Material( - borderRadius: BorderRadius.circular(10), - color: currentAccountId == null && currentAnonymousInstance == anonymousInstances![realIndex].instance ? selectedColor : null, + secondChild: CircleAvatar( + backgroundColor: Colors.transparent, + foregroundImage: anonymousInstances![realIndex].instanceIcon == null ? null : CachedNetworkImageProvider(anonymousInstances![realIndex].instanceIcon!), + maxRadius: 20, ), ), - ), - // This is the status indicator - Positioned( - right: 1, - bottom: 1, - child: AnimatedOpacity( - opacity: anonymousInstances![realIndex].alive == null ? 0 : 1, - duration: const Duration(milliseconds: 500), - child: Icon( - anonymousInstances![realIndex].alive == true ? Icons.check_circle_rounded : Icons.remove_circle_rounded, - size: 10, - color: Color.alphaBlend(theme.colorScheme.primaryContainer.withOpacity(0.6), anonymousInstances![realIndex].alive == true ? Colors.green : Colors.red), + Positioned( + right: 0, + bottom: 0, + child: SizedBox( + width: 12, + height: 12, + child: Material( + borderRadius: BorderRadius.circular(10), + color: currentAccountId == null && currentAnonymousInstance == anonymousInstances![realIndex].instance ? selectedColor : null, + ), ), ), - ), - ], - ), - title: Row( - children: [ - const Icon( - Icons.person_off_rounded, - size: 15, - ), - const SizedBox(width: 5), - Text( - AppLocalizations.of(context)!.anonymous, - style: theme.textTheme.titleMedium?.copyWith(), - ), - ], - ), - subtitle: Row( - children: [ - Text(anonymousInstances![realIndex].instance), - AnimatedOpacity( - opacity: anonymousInstances![realIndex].latency == null ? 0 : 1, - duration: const Duration(milliseconds: 500), - child: Row( - children: [ - const SizedBox(width: 5), - Text( - '•', - style: TextStyle( - color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), - ), - ), - const SizedBox(width: 5), - Text( - '${anonymousInstances![realIndex].latency?.inMilliseconds}ms', - style: TextStyle( - color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), - ), + // This is the status indicator + Positioned( + right: 1, + bottom: 1, + child: AnimatedOpacity( + opacity: anonymousInstances![realIndex].alive == null ? 0 : 1, + duration: const Duration(milliseconds: 500), + child: Icon( + anonymousInstances![realIndex].alive == true ? Icons.check_circle_rounded : Icons.remove_circle_rounded, + size: 10, + color: Color.alphaBlend(theme.colorScheme.primaryContainer.withOpacity(0.6), anonymousInstances![realIndex].alive == true ? Colors.green : Colors.red), ), - ], + ), + ), + ], + ), + title: Row( + children: [ + const Icon( + Icons.person_off_rounded, + size: 15, + ), + const SizedBox(width: 5), + Text( + AppLocalizations.of(context)!.anonymous, + style: theme.textTheme.titleMedium?.copyWith(), + ), + ], + ), + subtitle: Wrap( + children: [ + Text(anonymousInstances![realIndex].instance), + AnimatedSize( + duration: const Duration(milliseconds: 250), + child: anonymousInstances![realIndex].version == null + ? const SizedBox(height: 20, width: 0) + : Row( + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox(width: 5), + Text( + '•', + style: TextStyle( + color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), + ), + ), + const SizedBox(width: 5), + Text( + 'v${anonymousInstances![realIndex].version}', + style: TextStyle( + color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), + ), + ), + ], + ), + ), + AnimatedSize( + duration: const Duration(milliseconds: 250), + child: anonymousInstances![realIndex].latency == null + ? const SizedBox(height: 20, width: 0) + : Row( + mainAxisSize: MainAxisSize.min, + children: [ + const SizedBox(width: 5), + Text( + '•', + style: TextStyle( + color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), + ), + ), + const SizedBox(width: 5), + Text( + '${anonymousInstances![realIndex].latency?.inMilliseconds}ms', + style: TextStyle( + color: Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.55), + ), + ), + ], + ), ), - ), - ], + ], + ), + trailing: ((accounts?.length ?? 0) > 0 || anonymousInstances!.length > 1) + ? (currentAccountId == null && currentAnonymousInstance == anonymousInstances![realIndex].instance) + ? IconButton( + icon: Icon(Icons.logout, semanticLabel: AppLocalizations.of(context)!.removeInstance), + onPressed: () async { + context.read().add(OnRemoveAnonymousInstance(anonymousInstances![realIndex].instance)); + + if (anonymousInstances!.length > 1) { + context + .read() + .add(OnSetCurrentAnonymousInstance(anonymousInstances!.lastWhere((instance) => instance != anonymousInstances![realIndex]).instance)); + context.read().add(InstanceChanged(instance: anonymousInstances!.lastWhere((instance) => instance != anonymousInstances![realIndex]).instance)); + } else { + context.read().add(SwitchAccount(accountId: accounts!.last.account.id)); + } + + setState(() => anonymousInstances = null); + }, + ) + : IconButton( + icon: Icon( + Icons.delete, + semanticLabel: AppLocalizations.of(context)!.removeInstance, + ), + onPressed: () async { + context.read().add(OnRemoveAnonymousInstance(anonymousInstances![realIndex].instance)); + setState(() { + anonymousInstances = null; + }); + }) + : null, ), - trailing: ((accounts?.length ?? 0) > 0 || anonymousInstances!.length > 1) - ? (currentAccountId == null && currentAnonymousInstance == anonymousInstances![realIndex].instance) - ? IconButton( - icon: Icon(Icons.logout, semanticLabel: AppLocalizations.of(context)!.removeInstance), - onPressed: () async { - context.read().add(OnRemoveAnonymousInstance(anonymousInstances![realIndex].instance)); - - if (anonymousInstances!.length > 1) { - context - .read() - .add(OnSetCurrentAnonymousInstance(anonymousInstances!.lastWhere((instance) => instance != anonymousInstances![realIndex]).instance)); - context.read().add(InstanceChanged(instance: anonymousInstances!.lastWhere((instance) => instance != anonymousInstances![realIndex]).instance)); - } else { - context.read().add(SwitchAccount(accountId: accounts!.last.account.id)); - } - - setState(() => anonymousInstances = null); - }, - ) - : IconButton( - icon: Icon( - Icons.delete, - semanticLabel: AppLocalizations.of(context)!.removeInstance, - ), - onPressed: () async { - context.read().add(OnRemoveAnonymousInstance(anonymousInstances![realIndex].instance)); - setState(() { - anonymousInstances = null; - }); - }) - : null, ), ), ), @@ -477,21 +535,22 @@ class _ProfileSelectState extends State { })).timeout(const Duration(seconds: 5)); // Intentionally don't await these here - fetchInstanceIcons(accountsExtended); + fetchInstanceInfo(accountsExtended); pingInstances(accountsExtended); setState(() => this.accounts = accountsExtended); } - Future fetchInstanceIcons(List accountsExtended) async { + Future fetchInstanceInfo(List accountsExtended) async { accountsExtended.forEach((account) async { - final GetInstanceIconResponse instanceIconResponse = await getInstanceIcon(account.instance).timeout( + final GetInstanceInfoResponse instanceinfoResponse = await getInstanceInfo(account.instance).timeout( const Duration(seconds: 5), - onTimeout: () => const GetInstanceIconResponse(success: false), + onTimeout: () => const GetInstanceInfoResponse(success: false), ); setState(() { - account.instanceIcon = instanceIconResponse.icon; - account.alive = instanceIconResponse.success; + account.instanceIcon = instanceinfoResponse.icon; + account.version = instanceinfoResponse.version; + account.alive = instanceinfoResponse.success; }); }); } @@ -512,21 +571,22 @@ class _ProfileSelectState extends State { void fetchAnonymousInstances() { final List anonymousInstances = context.read().state.anonymousInstances.map((instance) => AnonymousInstanceExtended(instance: instance)).toList(); - fetchAnonymousInstanceIcons(anonymousInstances); + fetchAnonymousInstanceInfo(anonymousInstances); pingAnonymousInstances(anonymousInstances); setState(() => this.anonymousInstances = anonymousInstances); } - Future fetchAnonymousInstanceIcons(List anonymousInstancesExtended) async { + Future fetchAnonymousInstanceInfo(List anonymousInstancesExtended) async { anonymousInstancesExtended.forEach((anonymousInstance) async { - final GetInstanceIconResponse instanceIconResponse = await getInstanceIcon(anonymousInstance.instance).timeout( + final GetInstanceInfoResponse instanceInfoResponse = await getInstanceInfo(anonymousInstance.instance).timeout( const Duration(seconds: 5), - onTimeout: () => const GetInstanceIconResponse(success: false), + onTimeout: () => const GetInstanceInfoResponse(success: false), ); setState(() { - anonymousInstance.instanceIcon = instanceIconResponse.icon; - anonymousInstance.alive = instanceIconResponse.success; + anonymousInstance.instanceIcon = instanceInfoResponse.icon; + anonymousInstance.version = instanceInfoResponse.version; + anonymousInstance.alive = instanceInfoResponse.success; }); }); } @@ -548,6 +608,7 @@ class AccountExtended { final Account account; String? instance; String? instanceIcon; + String? version; Duration? latency; bool? alive; @@ -558,6 +619,7 @@ class AccountExtended { class AnonymousInstanceExtended { String instance; String? instanceIcon; + String? version; Duration? latency; bool? alive; diff --git a/lib/instance/instance_page.dart b/lib/instance/instance_page.dart index 5b9b7f708..b5cf98ece 100644 --- a/lib/instance/instance_page.dart +++ b/lib/instance/instance_page.dart @@ -11,7 +11,7 @@ import 'package:thunder/utils/links.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; class InstancePage extends StatefulWidget { - final Site site; + final GetSiteResponse getSiteResponse; final bool? isBlocked; // This is needed (in addition to Site) specifically for blocking. @@ -21,7 +21,7 @@ class InstancePage extends StatefulWidget { const InstancePage({ super.key, - required this.site, + required this.getSiteResponse, required this.isBlocked, required this.instanceId, }); @@ -66,7 +66,14 @@ class _InstancePageState extends State { slivers: [ SliverAppBar( pinned: true, - title: Text(fetchInstanceNameFromUrl(widget.site.actorId) ?? ''), + title: ListTile( + title: Text( + fetchInstanceNameFromUrl(widget.getSiteResponse.siteView.site.actorId) ?? '', + style: theme.textTheme.titleLarge, + ), + subtitle: Text("v${widget.getSiteResponse.version}"), + contentPadding: const EdgeInsets.symmetric(horizontal: 0), + ), actions: [ if (LemmyClient.instance.supportsFeature(LemmyFeature.blockInstance) && widget.instanceId != null) IconButton( @@ -76,7 +83,7 @@ class _InstancePageState extends State { context.read().add(InstanceActionEvent( instanceAction: InstanceAction.block, instanceId: widget.instanceId!, - domain: fetchInstanceNameFromUrl(widget.site.actorId), + domain: fetchInstanceNameFromUrl(widget.getSiteResponse.siteView.site.actorId), value: !isBlocked!, )); }, @@ -87,7 +94,7 @@ class _InstancePageState extends State { ), IconButton( tooltip: l10n.openInBrowser, - onPressed: () => handleLink(context, url: widget.site.actorId), + onPressed: () => handleLink(context, url: widget.getSiteResponse.siteView.site.actorId), icon: Icon( Icons.open_in_browser_rounded, semanticLabel: l10n.openInBrowser, @@ -99,7 +106,7 @@ class _InstancePageState extends State { child: Padding( padding: const EdgeInsets.all(20), child: Material( - child: InstanceView(site: widget.site), + child: InstanceView(site: widget.getSiteResponse.siteView.site), ), ), ), diff --git a/lib/utils/instance.dart b/lib/utils/instance.dart index 682aa6180..1e5b70a8e 100644 --- a/lib/utils/instance.dart +++ b/lib/utils/instance.dart @@ -136,24 +136,29 @@ Future getLemmyCommentId(String text) async { return null; } -class GetInstanceIconResponse { - final String? icon; +class GetInstanceInfoResponse { final bool success; + final String? icon; + final String? version; - const GetInstanceIconResponse({required this.success, this.icon}); + const GetInstanceInfoResponse({required this.success, this.icon, this.version}); } -Future getInstanceIcon(String? url) async { +Future getInstanceInfo(String? url) async { if (url?.isEmpty ?? true) { - return const GetInstanceIconResponse(success: false); + return const GetInstanceInfoResponse(success: false); } try { final site = await LemmyApiV3(url!).run(const GetSite()).timeout(const Duration(seconds: 5)); - return GetInstanceIconResponse(success: true, icon: site.siteView?.site.icon); + return GetInstanceInfoResponse( + success: true, + icon: site.siteView.site.icon, + version: site.version, + ); } catch (e) { // Bad instances will throw an exception, so no icon - return const GetInstanceIconResponse(success: false); + return const GetInstanceInfoResponse(success: false); } } diff --git a/lib/utils/navigate_instance.dart b/lib/utils/navigate_instance.dart index dd0b9dd33..662829a77 100644 --- a/lib/utils/navigate_instance.dart +++ b/lib/utils/navigate_instance.dart @@ -39,7 +39,7 @@ Future navigateToInstancePage(BuildContext context, {required String insta BlocProvider.value(value: thunderBloc), ], child: InstancePage( - site: getSiteResponse!.siteView.site, + getSiteResponse: getSiteResponse!, isBlocked: isBlocked, instanceId: instanceId, ),