mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
Try to fix #241
This commit is contained in:
@@ -503,10 +503,13 @@ mixin class _ReaderWindow {
|
||||
|
||||
late WindowFrameController windowFrame;
|
||||
|
||||
bool _isInit = false;
|
||||
|
||||
void initReaderWindow() {
|
||||
if (!App.isDesktop) return;
|
||||
if (!App.isDesktop || _isInit) return;
|
||||
windowFrame = WindowFrame.of(App.rootContext);
|
||||
windowFrame.addCloseListener(onWindowClose);
|
||||
_isInit = true;
|
||||
}
|
||||
|
||||
void fullscreen() async {
|
||||
@@ -519,8 +522,12 @@ mixin class _ReaderWindow {
|
||||
}
|
||||
|
||||
bool onWindowClose() {
|
||||
App.rootContext.pop();
|
||||
return false;
|
||||
if (Navigator.of(App.rootContext).canPop()) {
|
||||
Navigator.of(App.rootContext).pop();
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
void disposeReaderWindow() {
|
||||
|
Reference in New Issue
Block a user