mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-09-01 06:24:07 +00:00
fix issue with opening media
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
Some checks are pending
Flutter analyze & test / flutter_analyze_and_test (push) Waiting to run
This commit is contained in:
parent
0e06a21948
commit
3171541b6a
4 changed files with 3 additions and 32 deletions
|
|
@ -4,6 +4,7 @@
|
|||
## 0.4.3
|
||||
|
||||
- New: Contact labels
|
||||
- Fix: Multiple black screens
|
||||
|
||||
## 0.4.0
|
||||
|
||||
|
|
|
|||
|
|
@ -706,18 +706,7 @@ class _CameraPreviewViewState extends State<CameraPreviewView> {
|
|||
_checkAndInitCamera();
|
||||
});
|
||||
}
|
||||
// Show a loader instead of an empty container to prevent a black screen
|
||||
// while the camera is initializing or if initialization failed.
|
||||
return Center(
|
||||
child: SizedBox(
|
||||
height: 60,
|
||||
width: 60,
|
||||
child: ThreeRotatingDots(
|
||||
size: 40,
|
||||
color: context.color.primary,
|
||||
),
|
||||
),
|
||||
);
|
||||
return Container();
|
||||
}
|
||||
return StreamBuilder(
|
||||
stream: userService.onUserUpdated,
|
||||
|
|
|
|||
|
|
@ -671,25 +671,6 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
|||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
children: [
|
||||
// Fallback: when no content is visible (no media, no loader,
|
||||
// no twonly-present overlay), show a loader to prevent a
|
||||
// black screen. If there are truly no files left, exit.
|
||||
if (!_showDownloadingLoader &&
|
||||
currentMedia == null &&
|
||||
videoController == null &&
|
||||
!displayTwonlyPresent)
|
||||
Builder(builder: (context) {
|
||||
// Schedule exit on the next frame if there is nothing
|
||||
// left to display, so we don't trap the user.
|
||||
if (allMediaFiles.isEmpty) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
if (mounted && currentMedia == null) {
|
||||
Navigator.of(context).maybePop();
|
||||
}
|
||||
});
|
||||
}
|
||||
return _loader();
|
||||
}),
|
||||
if (_showDownloadingLoader) _loader(),
|
||||
if ((currentMedia != null || videoController != null) &&
|
||||
(canBeSeenUntil == null || progress.value >= 0))
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ description: "twonly, a privacy-friendly way to connect with friends through sec
|
|||
|
||||
publish_to: 'none'
|
||||
|
||||
version: 0.4.3+162
|
||||
version: 0.4.3+163
|
||||
|
||||
environment:
|
||||
sdk: ^3.11.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue