Fixed title generation, added info message for imported chats
This commit is contained in:
parent
e8820162b0
commit
e7a1d93196
|
@ -544,6 +544,11 @@
|
|||
"description": "Text displayed as description for export chats button",
|
||||
"context": "Visible in the settings view"
|
||||
},
|
||||
"settingsExportChatsSuccess": "Chats exported successfully",
|
||||
"@settingsExportChatsSuccess": {
|
||||
"description": "Text displayed when chats are exported successfully",
|
||||
"context": "Visible in the settings view"
|
||||
},
|
||||
"settingsImportChats": "Import chats",
|
||||
"@settingsImportChats": {
|
||||
"description": "Text displayed as description for import chats button",
|
||||
|
|
|
@ -88,6 +88,12 @@ class _ScreenSettingsExportState extends State<ScreenSettingsExport> {
|
|||
File(path).writeAsString(content);
|
||||
}
|
||||
}
|
||||
// ignore: use_build_context_synchronously
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||
// ignore: use_build_context_synchronously
|
||||
content: Text(AppLocalizations.of(context)!
|
||||
.settingsExportChatsSuccess),
|
||||
showCloseIcon: true));
|
||||
}),
|
||||
allowMultipleChats
|
||||
? button(
|
||||
|
|
|
@ -216,12 +216,8 @@ void setModel(BuildContext context, Function setState) {
|
|||
? ((MediaQuery.of(context)
|
||||
.platformBrightness ==
|
||||
Brightness.light)
|
||||
? themeLight()
|
||||
.colorScheme
|
||||
.secondary
|
||||
: themeDark()
|
||||
.colorScheme
|
||||
.secondary)
|
||||
? themeLight().colorScheme.secondary
|
||||
: themeDark().colorScheme.secondary)
|
||||
: null,
|
||||
labelStyle: (usedIndex == index &&
|
||||
!(prefs?.getBool(
|
||||
|
@ -245,12 +241,8 @@ void setModel(BuildContext context, Function setState) {
|
|||
: (MediaQuery.of(context)
|
||||
.platformBrightness ==
|
||||
Brightness.light)
|
||||
?themeLight()
|
||||
.colorScheme
|
||||
.primary
|
||||
: themeDark()
|
||||
.colorScheme
|
||||
.primary,
|
||||
? themeLight().colorScheme.primary
|
||||
: themeDark().colorScheme.primary,
|
||||
onSelected: (bool selected) {
|
||||
selectionHaptic();
|
||||
if (addIndex == index) {
|
||||
|
@ -539,7 +531,11 @@ Future<String> prompt(BuildContext context,
|
|||
uuid) {
|
||||
try {
|
||||
var title = await getTitleAi(
|
||||
await getHistory());
|
||||
jsonDecode(jsonDecode(
|
||||
(prefs!.getStringList(
|
||||
"chats") ??
|
||||
[])[
|
||||
i])["messages"]));
|
||||
controller.text = title;
|
||||
setLocalState(() {
|
||||
loading = false;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"settingsVoiceTtsNotSupported",
|
||||
"settingsVoiceTtsNotSupportedDescription",
|
||||
"settingsVoiceNotEnabled",
|
||||
"settingsExportChatsSuccess",
|
||||
"settingsLicenses"
|
||||
],
|
||||
|
||||
|
@ -38,6 +39,7 @@
|
|||
"settingsVoiceTtsNotSupported",
|
||||
"settingsVoiceTtsNotSupportedDescription",
|
||||
"settingsVoiceNotEnabled",
|
||||
"settingsExportChatsSuccess",
|
||||
"settingsLicenses"
|
||||
],
|
||||
|
||||
|
@ -59,6 +61,7 @@
|
|||
"settingsVoiceTtsNotSupported",
|
||||
"settingsVoiceTtsNotSupportedDescription",
|
||||
"settingsVoiceNotEnabled",
|
||||
"settingsExportChatsSuccess",
|
||||
"settingsLicenses"
|
||||
],
|
||||
|
||||
|
@ -80,6 +83,7 @@
|
|||
"settingsVoiceTtsNotSupported",
|
||||
"settingsVoiceTtsNotSupportedDescription",
|
||||
"settingsVoiceNotEnabled",
|
||||
"settingsExportChatsSuccess",
|
||||
"settingsLicenses"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue