Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions lib/screens/nexus/settings_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import '../../providers/account_provider.dart';
import '../../providers/app_mode_provider.dart';
import '../../providers/billing_providers.dart';
import '../../providers/models_provider.dart';
import '../../providers/nexus_gateway_provider.dart';
import '../../providers/omni_router_provider.dart';
import '../../providers/theme_provider.dart';
Expand Down Expand Up @@ -36,17 +37,25 @@ class SettingsTab extends ConsumerWidget {
Widget build(BuildContext context, WidgetRef ref) {
final mode = ref.watch(appModeProvider);

return ListView(
padding: const EdgeInsets.all(16),
children: [
_profile(context, ref),
const SizedBox(height: 18),
if (mode.showsModelManager) ...[
const ModelManager(),
// Pull-to-refresh re-fetches the installed model list from the selected
// server, so models installed/removed outside the app (e.g. via the
// Lemonade server itself or another client) show up without a restart —
// the list otherwise only updates on server/app-mode changes.
return RefreshIndicator(
onRefresh: () => ref.read(modelsProvider.notifier).fetchModels(),
child: ListView(
physics: const AlwaysScrollableScrollPhysics(),
padding: const EdgeInsets.all(16),
children: [
_profile(context, ref),
const SizedBox(height: 18),
if (mode.showsModelManager) ...[
const ModelManager(),
const SizedBox(height: 18),
],
..._groups(context, ref),
],
..._groups(context, ref),
],
),
);
}

Expand Down