fix: editor text mode bug

This commit is contained in:
hiddify-com
2024-07-30 15:54:44 +02:00
parent ff1c500333
commit 482962abdf
2 changed files with 9 additions and 3 deletions

View File

@@ -555,8 +555,7 @@ class _JsonEditorState extends State<JsonEditor> {
controller: _controller, controller: _controller,
onChanged: parseData, onChanged: parseData,
maxLines: 10, maxLines: 10,
minLines: null, // expands: true,
expands: true,
textAlignVertical: TextAlignVertical.top, textAlignVertical: TextAlignVertical.top,
decoration: const InputDecoration( decoration: const InputDecoration(
border: InputBorder.none, border: InputBorder.none,

View File

@@ -157,7 +157,14 @@ class ProfileDetailsNotifier extends _$ProfileDetailsNotifier with AppLogger {
case LocalProfileEntity() when value.isEditing: case LocalProfileEntity() when value.isEditing:
loggy.debug('editing profile'); loggy.debug('editing profile');
failureOrSuccess = await _profilesRepo.patch(profile).run(); failureOrSuccess = await _profilesRepo.patch(profile).run();
if (failureOrSuccess.isRight()) {
failureOrSuccess = await _profilesRepo
.updateContent(
profile.id,
value.configContent,
)
.run();
}
default: default:
loggy.warning("local profile can't be added manually"); loggy.warning("local profile can't be added manually");
} }