fix macos minisized after checking permission
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
ea12eccc90
commit
ae640dda56
@ -2281,10 +2281,18 @@ void onCopyFingerprint(String value) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<bool> callMainCheckSuperUserPermission() async {
|
||||||
|
bool checked = await bind.mainCheckSuperUserPermission();
|
||||||
|
if (Platform.isMacOS) {
|
||||||
|
await windowManager.show();
|
||||||
|
}
|
||||||
|
return checked;
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> start_service(bool is_start) async {
|
Future<void> start_service(bool is_start) async {
|
||||||
bool checked = !bind.mainIsInstalled() ||
|
bool checked = !bind.mainIsInstalled() ||
|
||||||
!Platform.isMacOS ||
|
!Platform.isMacOS ||
|
||||||
await bind.mainCheckSuperUserPermission();
|
await callMainCheckSuperUserPermission();
|
||||||
if (checked) {
|
if (checked) {
|
||||||
bind.mainSetOption(key: "stop-service", value: is_start ? "" : "Y");
|
bind.mainSetOption(key: "stop-service", value: is_start ? "" : "Y");
|
||||||
}
|
}
|
||||||
|
@ -1832,13 +1832,10 @@ Widget _lock(
|
|||||||
Text(translate(label)).marginOnly(left: 5),
|
Text(translate(label)).marginOnly(left: 5),
|
||||||
]).marginSymmetric(vertical: 2)),
|
]).marginSymmetric(vertical: 2)),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
bool checked = await bind.mainCheckSuperUserPermission();
|
bool checked = await callMainCheckSuperUserPermission();
|
||||||
if (checked) {
|
if (checked) {
|
||||||
onUnlock();
|
onUnlock();
|
||||||
}
|
}
|
||||||
if (Platform.isMacOS) {
|
|
||||||
await windowManager.show();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
).marginSymmetric(horizontal: 2, vertical: 4),
|
).marginSymmetric(horizontal: 2, vertical: 4),
|
||||||
).marginOnly(left: _kCardLeftMargin),
|
).marginOnly(left: _kCardLeftMargin),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user