mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
Improve image loading
This commit is contained in:
@@ -131,9 +131,10 @@ class _ReaderSettingsState extends State<ReaderSettings> {
|
||||
"On the image browsing page, you can quickly collect images by sliding horizontally or vertically according to your reading mode"
|
||||
.tl,
|
||||
).toSliver(),
|
||||
_PopupWindowSetting(
|
||||
_CallbackSetting(
|
||||
title: "Custom Image Processing".tl,
|
||||
builder: () => _CustomImageProcessing(),
|
||||
callback: () => context.to(() => _CustomImageProcessing()),
|
||||
actionTitle: "Edit".tl,
|
||||
).toSliver(),
|
||||
],
|
||||
);
|
||||
@@ -163,10 +164,25 @@ class __CustomImageProcessingState extends State<_CustomImageProcessing> {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
int resetKey = 0;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return PopUpWidgetScaffold(
|
||||
title: "Custom Image Processing".tl,
|
||||
return Scaffold(
|
||||
appBar: Appbar(
|
||||
title: Text("Custom Image Processing".tl),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
current = defaultCustomImageProcessing;
|
||||
appdata.settings['customImageProcessing'] = current;
|
||||
resetKey++;
|
||||
setState(() {});
|
||||
},
|
||||
child: Text("Reset".tl),
|
||||
)
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
_SwitchSetting(
|
||||
@@ -182,6 +198,7 @@ class __CustomImageProcessingState extends State<_CustomImageProcessing> {
|
||||
),
|
||||
child: SizedBox.expand(
|
||||
child: CodeEditor(
|
||||
key: ValueKey(resetKey),
|
||||
initialValue: appdata.settings['customImageProcessing'],
|
||||
onChanged: (value) {
|
||||
current = value;
|
||||
|
Reference in New Issue
Block a user