Skip to content

armgit / ente

Public Imported from GitHub
0

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

fix: redirect video streaming to setting page

Prateek Sunalfe4018588934
diff --git a/mobile/apps/photos/lib/ui/settings/advanced_settings_screen.dart b/mobile/apps/photos/lib/ui/settings/advanced_settings_screen.dart
index 74f8afb11d..1458badbe4 100644
--- a/mobile/apps/photos/lib/ui/settings/advanced_settings_screen.dart
+++ b/mobile/apps/photos/lib/ui/settings/advanced_settings_screen.dart
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import "package:photos/core/error-reporting/super_logging.dart";
import "package:photos/generated/l10n.dart";
import "package:photos/service_locator.dart";
-import "package:photos/services/video_preview_service.dart";
import 'package:photos/theme/ente_theme.dart';
import 'package:photos/ui/components/buttons/icon_button_widget.dart';
import 'package:photos/ui/components/captioned_text_widget.dart';
@@ -12,6 +11,7 @@ import 'package:photos/ui/components/title_bar_widget.dart';
import "package:photos/ui/components/toggle_switch_widget.dart";
import "package:photos/ui/settings/app_icon_selection_screen.dart";
import "package:photos/ui/settings/ml/machine_learning_settings_page.dart";
+import "package:photos/ui/settings/streaming/video_streaming_settings_page.dart";
import 'package:photos/utils/navigation_util.dart';
class AdvancedSettingsScreen extends StatelessWidget {
@@ -43,8 +43,10 @@ class AdvancedSettingsScreen extends StatelessWidget {
delegate: SliverChildBuilderDelegate(
(delegateBuildContext, index) {
return Padding(
- padding:
- const EdgeInsets.symmetric(horizontal: 16, vertical: 20),
+ padding: const EdgeInsets.symmetric(
+ horizontal: 16,
+ vertical: 20,
+ ),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
@@ -113,23 +115,21 @@ class AdvancedSettingsScreen extends StatelessWidget {
title: S.of(context).videoStreaming,
),
menuItemColor: colorScheme.fillFaint,
+ trailingWidget: Icon(
+ Icons.chevron_right_outlined,
+ color: colorScheme.strokeBase,
+ ),
singleBorderRadius: 8,
alignCaptionedTextToLeft: true,
- trailingWidget: ToggleSwitchWidget(
- value: () => VideoPreviewService
- .instance.isVideoStreamingEnabled,
- onChanged: () async {
- final isEnabled = VideoPreviewService
- .instance.isVideoStreamingEnabled;
-
- await VideoPreviewService.instance
- .setIsVideoStreamingEnabled(!isEnabled);
- },
- ),
- ),
- const SizedBox(
- height: 24,
+ onTap: () async {
+ // ignore: unawaited_futures
+ routeToPage(
+ context,
+ const VideoStreamingSettingsPage(),
+ );
+ },
),
+ const SizedBox(height: 24),
MenuItemWidget(
captionedTextWidget: CaptionedTextWidget(
title: S.of(context).crashReporting,