Skip to content

Commit

Permalink
Small fixes for release 0.2
Browse files Browse the repository at this point in the history
Ensure that models list has been updated before checking for availability of last used model and check models list is not empty before defaulting model selection
  • Loading branch information
WilliamKarolDiCioccio committed Jun 17, 2024
1 parent 301f36a commit dabec12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/providers/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ChatProvider extends ChangeNotifier {
if (models.any((model) => model.name == modelName)) {
_modelName = modelName;
} else {
_modelName = models.first.name;
if (models.isNotEmpty) _modelName = models.first.name;
}

_enableWebSearch = prefs.getBool('enableWebSearch') ?? false;
Expand Down
2 changes: 1 addition & 1 deletion app/lib/providers/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ModelProvider extends ChangeNotifier {
});
});

_updateListStatic();
await _updateListStatic();
} catch (e) {
logger.e(e);
}
Expand Down

0 comments on commit dabec12

Please sign in to comment.