mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-01-15 14:28:40 +00:00
fix #107
This commit is contained in:
parent
05368a7ea9
commit
3e71edba32
1 changed files with 19 additions and 18 deletions
|
|
@ -162,7 +162,7 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
||||||
sharePreviewIsShown = true;
|
sharePreviewIsShown = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
if (useHighQuality) {
|
if (useHighQuality && !isFront) {
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
await controller.pausePreview();
|
await controller.pausePreview();
|
||||||
if (!context.mounted) return;
|
if (!context.mounted) return;
|
||||||
|
|
@ -221,7 +221,7 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
await controller.resumePreview();
|
await controller.resumePreview();
|
||||||
} else {
|
} else {
|
||||||
selectCamera(0);
|
selectCamera(cameraId);
|
||||||
}
|
}
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
@ -324,22 +324,23 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
ActionButton(
|
if (!isFront)
|
||||||
Icons.hd_rounded,
|
ActionButton(
|
||||||
tooltipText: context.lang.toggleHighQuality,
|
Icons.hd_rounded,
|
||||||
color: useHighQuality
|
tooltipText: context.lang.toggleHighQuality,
|
||||||
? Colors.white
|
color: useHighQuality
|
||||||
: const Color.fromARGB(158, 255, 255, 255),
|
? Colors.white
|
||||||
onPressed: () async {
|
: const Color.fromARGB(158, 255, 255, 255),
|
||||||
useHighQuality = !useHighQuality;
|
onPressed: () async {
|
||||||
setState(() {});
|
useHighQuality = !useHighQuality;
|
||||||
var user = await getUser();
|
setState(() {});
|
||||||
if (user != null) {
|
var user = await getUser();
|
||||||
user.useHighQuality = useHighQuality;
|
if (user != null) {
|
||||||
updateUser(user);
|
user.useHighQuality = useHighQuality;
|
||||||
}
|
updateUser(user);
|
||||||
},
|
}
|
||||||
),
|
},
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue