Fixed model add dialog
This commit is contained in:
parent
1d3a5e91d9
commit
17c276301f
|
@ -1,4 +1,3 @@
|
|||
import 'package:dartx/dartx.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
|
@ -9,6 +8,7 @@ import '../screen_settings.dart';
|
|||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
||||
import 'package:dartx/dartx.dart';
|
||||
import 'package:duration_picker/duration_picker.dart';
|
||||
import 'package:dynamic_color/dynamic_color.dart';
|
||||
|
||||
|
|
|
@ -264,13 +264,6 @@ void setModel(BuildContext context, Function setState) {
|
|||
if (addIndex == index) {
|
||||
usedIndex = oldIndex;
|
||||
Navigator.of(context).pop();
|
||||
// ScaffoldMessenger.of(context)
|
||||
// .showSnackBar(SnackBar(
|
||||
// content: Text(
|
||||
// AppLocalizations.of(
|
||||
// context)!
|
||||
// .modelDialogAddSteps),
|
||||
// showCloseIcon: true));
|
||||
addModel(context, setState);
|
||||
}
|
||||
if (!chatAllowed && model != null) {
|
||||
|
@ -462,6 +455,7 @@ void addModel(BuildContext context, Function setState) async {
|
|||
if (model!.split(":").length == 1) {
|
||||
model = "$model:latest";
|
||||
}
|
||||
chatAllowed = true;
|
||||
});
|
||||
ScaffoldMessenger.of(mainContext!).showSnackBar(
|
||||
SnackBar(content: Text(downloadSuccessText), showCloseIcon: true));
|
||||
|
|
Loading…
Reference in New Issue