Added haptics to prompt dialog

This commit is contained in:
JHubi1 2024-06-26 13:49:51 +02:00
parent 0f380f69ef
commit 9654b1b96c
No known key found for this signature in database
GPG Key ID: 7BF82570CBBBD050
1 changed files with 4 additions and 1 deletions

View File

@ -103,7 +103,8 @@ void setModel(BuildContext context, Function setState) {
prefs?.setBool("multimodal", multimodal); prefs?.setBool("multimodal", multimodal);
if (model != null && if (model != null &&
int.parse(prefs!.getString("keepAlive") ?? "300") != 0 && (prefs!.getBool("preloadModel") ?? true)) { int.parse(prefs!.getString("keepAlive") ?? "300") != 0 &&
(prefs!.getBool("preloadModel") ?? true)) {
setLocalState(() {}); setLocalState(() {});
try { try {
// don't use llama client, package doesn't support just loading without content // don't use llama client, package doesn't support just loading without content
@ -474,6 +475,7 @@ Future<String> prompt(BuildContext context,
.tooltipSave, .tooltipSave,
onPressed: () async { onPressed: () async {
if (validator != null) { if (validator != null) {
selectionHaptic();
setLocalState(() { setLocalState(() {
error = null; error = null;
}); });
@ -499,6 +501,7 @@ Future<String> prompt(BuildContext context,
tooltip: AppLocalizations.of(context)! tooltip: AppLocalizations.of(context)!
.tooltipLetAIThink, .tooltipLetAIThink,
onPressed: () async { onPressed: () async {
selectionHaptic();
setLocalState(() { setLocalState(() {
loading = true; loading = true;
}); });