|
|
@ -6,7 +6,6 @@ import 'package:flutter_typeahead/flutter_typeahead.dart';
|
|
|
|
import 'package:fluffychat/config/app_config.dart';
|
|
|
|
import 'package:fluffychat/config/app_config.dart';
|
|
|
|
import 'package:fluffychat/config/themes.dart';
|
|
|
|
import 'package:fluffychat/config/themes.dart';
|
|
|
|
import 'package:fluffychat/pages/homeserver_picker/public_homeserver.dart';
|
|
|
|
import 'package:fluffychat/pages/homeserver_picker/public_homeserver.dart';
|
|
|
|
import 'package:fluffychat/utils/error_reporter.dart';
|
|
|
|
|
|
|
|
import 'package:fluffychat/utils/localized_exception_extension.dart';
|
|
|
|
import 'package:fluffychat/utils/localized_exception_extension.dart';
|
|
|
|
import 'homeserver_bottom_sheet.dart';
|
|
|
|
import 'homeserver_bottom_sheet.dart';
|
|
|
|
import 'homeserver_picker.dart';
|
|
|
|
import 'homeserver_picker.dart';
|
|
|
@ -33,19 +32,13 @@ class HomeserverAppBar extends StatelessWidget {
|
|
|
|
leading: const CircularProgressIndicator.adaptive(strokeWidth: 2),
|
|
|
|
leading: const CircularProgressIndicator.adaptive(strokeWidth: 2),
|
|
|
|
title: Text(L10n.of(context)!.loadingPleaseWait),
|
|
|
|
title: Text(L10n.of(context)!.loadingPleaseWait),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
errorBuilder: (context, error) {
|
|
|
|
errorBuilder: (context, error) => ListTile(
|
|
|
|
ErrorReporter(context, 'Unable to load homeservers').onErrorCallback(
|
|
|
|
leading: const Icon(Icons.error_outlined),
|
|
|
|
error ?? Object(),
|
|
|
|
title: Text(
|
|
|
|
StackTrace.current,
|
|
|
|
error?.toLocalizedString(context) ??
|
|
|
|
);
|
|
|
|
L10n.of(context)!.oopsSomethingWentWrong,
|
|
|
|
return ListTile(
|
|
|
|
),
|
|
|
|
leading: const Icon(Icons.error_outlined),
|
|
|
|
),
|
|
|
|
title: Text(
|
|
|
|
|
|
|
|
error?.toLocalizedString(context) ??
|
|
|
|
|
|
|
|
L10n.of(context)!.oopsSomethingWentWrong,
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemBuilder: (context, homeserver) => ListTile(
|
|
|
|
itemBuilder: (context, homeserver) => ListTile(
|
|
|
|
title: Text(homeserver.name),
|
|
|
|
title: Text(homeserver.name),
|
|
|
|
subtitle: homeserver.description == null
|
|
|
|
subtitle: homeserver.description == null
|
|
|
|