Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Merge branch 'main' into extract_strings

AmanRajSinghMourya6fbea6232e72
diff --cc mobile/apps/photos/lib/ui/viewer/file/detail_page.dart
index 8f71ccc3df,42b0a71954..18b50f6357
--- a/mobile/apps/photos/lib/ui/viewer/file/detail_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/detail_page.dart
@@@ -136,90 -151,88 +150,88 @@@ class _BodyState extends State<_Body>
_files!.length.toString() +
" files .",
);
- return InheritedDetailPageState(
- child: PopScope(
- canPop: !isGuestView,
- onPopInvokedWithResult: (didPop, _) async {
- if (isGuestView) {
- final authenticated = await _requestAuthentication();
- if (authenticated) {
- Bus.instance.fire(GuestViewEvent(false, false));
- await localSettings.setOnGuestView(false);
- }
+ return PopScope(
+ canPop: !isGuestView,
+ onPopInvokedWithResult: (didPop, _) async {
+ if (isGuestView) {
+ final authenticated = await _requestAuthentication();
+ if (authenticated) {
+ Bus.instance.fire(GuestViewEvent(false, false));
+ await localSettings.setOnGuestView(false);
}
- },
- child: Scaffold(
- appBar: PreferredSize(
- preferredSize: const Size.fromHeight(80),
- child: ValueListenableBuilder(
- builder: (BuildContext context, int selectedIndex, _) {
- return FileAppBar(
- _files![selectedIndex],
- _onFileRemoved,
- widget.config.mode == DetailPageMode.full,
- enableFullScreenNotifier: InheritedDetailPageState.of(context)
- .enableFullScreenNotifier,
- );
- },
- valueListenable: _selectedIndexNotifier,
- ),
+ }
+ },
+ child: Scaffold(
+ appBar: PreferredSize(
+ preferredSize: const Size.fromHeight(80),
+ child: ValueListenableBuilder(
+ builder: (BuildContext context, int selectedIndex, _) {
+ return FileAppBar(
+ _files![selectedIndex],
+ _onFileRemoved,
+ widget.config.mode == DetailPageMode.full,
+ enableFullScreenNotifier: InheritedDetailPageState.of(context)
+ .enableFullScreenNotifier,
+ );
+ },
+ valueListenable: _selectedIndexNotifier,
),
- extendBodyBehindAppBar: true,
- resizeToAvoidBottomInset: false,
- backgroundColor: Colors.black,
- body: Center(
- child: Stack(
- children: [
- _buildPageView(),
- ValueListenableBuilder(
- builder: (BuildContext context, int selectedIndex, _) {
- return FileBottomBar(
- _files![selectedIndex],
- _onEditFileRequested,
- widget.config.mode == DetailPageMode.minimalistic &&
- !isGuestView,
- onFileRemoved: _onFileRemoved,
- userID: Configuration.instance.getUserID(),
- enableFullScreenNotifier:
- InheritedDetailPageState.of(context)
- .enableFullScreenNotifier,
- );
- },
- valueListenable: _selectedIndexNotifier,
- ),
- ValueListenableBuilder(
- valueListenable: _selectedIndexNotifier,
- builder: (BuildContext context, int selectedIndex, _) {
- if (_files![selectedIndex].isPanorama() == true) {
- return ValueListenableBuilder(
- valueListenable: InheritedDetailPageState.of(context)
+ ),
+ extendBodyBehindAppBar: true,
+ resizeToAvoidBottomInset: false,
+ backgroundColor: Colors.black,
+ body: Center(
+ child: Stack(
+ children: [
+ _buildPageView(),
+ ValueListenableBuilder(
+ builder: (BuildContext context, int selectedIndex, _) {
+ return FileBottomBar(
+ _files![selectedIndex],
- _onNewImageEditor,
++ _onEditFileRequested,
+ widget.config.mode == DetailPageMode.minimalistic &&
+ !isGuestView,
+ onFileRemoved: _onFileRemoved,
+ userID: Configuration.instance.getUserID(),
+ enableFullScreenNotifier:
+ InheritedDetailPageState.of(context)
.enableFullScreenNotifier,
- builder: (context, value, child) {
- return IgnorePointer(
- ignoring: value,
- child: AnimatedOpacity(
- duration: const Duration(milliseconds: 200),
- opacity: !value ? 1.0 : 0.0,
- child: Align(
- alignment: Alignment.center,
- child: Tooltip(
- message: S.of(context).panorama,
- child: IconButton(
- style: IconButton.styleFrom(
- backgroundColor: const Color(0xAA252525),
- fixedSize: const Size(44, 44),
- ),
- icon: const Icon(
- Icons.threesixty,
- color: Colors.white,
- size: 26,
- ),
- onPressed: () async {
- await openPanoramaViewerPage(
- _files![selectedIndex],
- );
- },
+ );
+ },
+ valueListenable: _selectedIndexNotifier,
+ ),
+ ValueListenableBuilder(
+ valueListenable: _selectedIndexNotifier,
+ builder: (BuildContext context, int selectedIndex, _) {
+ if (_files![selectedIndex].isPanorama() == true) {
+ return ValueListenableBuilder(
+ valueListenable: InheritedDetailPageState.of(context)
+ .enableFullScreenNotifier,
+ builder: (context, value, child) {
+ return IgnorePointer(
+ ignoring: value,
+ child: AnimatedOpacity(
+ duration: const Duration(milliseconds: 200),
+ opacity: !value ? 1.0 : 0.0,
+ child: Align(
+ alignment: Alignment.center,
+ child: Tooltip(
+ message: S.of(context).panorama,
+ child: IconButton(
+ style: IconButton.styleFrom(
+ backgroundColor: const Color(0xAA252525),
+ fixedSize: const Size(44, 44),
+ ),
+ icon: const Icon(
+ Icons.threesixty,
+ color: Colors.white,
+ size: 26,
),
+ onPressed: () async {
+ await openPanoramaViewerPage(
+ _files![selectedIndex],
+ );
+ },
),
),
),