Browse Source

Merge pull request #318 from ente-io/mission_section_divider

Vishnu Mohandas 3 years ago
parent
commit
9ad968cec7
2 changed files with 56 additions and 53 deletions
  1. 51 51
      lib/ui/settings/social_section_widget.dart
  2. 5 2
      lib/ui/zoomable_live_image.dart

+ 51 - 51
lib/ui/settings/social_section_widget.dart

@@ -22,56 +22,56 @@ class SocialSectionWidget extends StatelessWidget {
   }
 
   Widget _getSectionOptions(BuildContext context) {
-    return Column(
-      children: [
-        GestureDetector(
-          behavior: HitTestBehavior.translucent,
-          onTap: () {
-            launch("https://twitter.com/enteio");
-          },
-          child: SettingsTextItem(text: "Twitter", icon: Icons.navigate_next),
-        ),
-        SectionOptionDivider,
-        GestureDetector(
-          behavior: HitTestBehavior.translucent,
-          onTap: () {
-            launch("https://ente.io/discord");
-          },
-          child: SettingsTextItem(text: "Discord", icon: Icons.navigate_next),
-        ),
-        SectionOptionDivider,
-        GestureDetector(
-          behavior: HitTestBehavior.translucent,
-          onTap: () {
-            launch("https://reddit.com/r/enteio");
-          },
-          child: SettingsTextItem(text: "Reddit", icon: Icons.navigate_next),
-        ),
-        !UpdateService.instance.isIndependent()
-            ? Column(
-                children: [
-                  GestureDetector(
-                    behavior: HitTestBehavior.translucent,
-                    onTap: () {
-                      if (Platform.isAndroid) {
-                        launch(
-                          "https://play.google.com/store/apps/details?id=io.ente.photos",
-                        );
-                      } else {
-                        launch(
-                          "https://apps.apple.com/in/app/ente-photos/id1542026904",
-                        );
-                      }
-                    },
-                    child: SettingsTextItem(
-                      text: "Rate us! ✨",
-                      icon: Icons.navigate_next,
-                    ),
-                  ),
-                ],
-              )
-            : Container(),
-      ],
-    );
+    List<Widget> options = [
+      GestureDetector(
+        behavior: HitTestBehavior.translucent,
+        onTap: () {
+          launch("https://twitter.com/enteio");
+        },
+        child: SettingsTextItem(text: "Twitter", icon: Icons.navigate_next),
+      ),
+      SectionOptionDivider,
+      GestureDetector(
+        behavior: HitTestBehavior.translucent,
+        onTap: () {
+          launch("https://ente.io/discord");
+        },
+        child: SettingsTextItem(text: "Discord", icon: Icons.navigate_next),
+      ),
+      SectionOptionDivider,
+      GestureDetector(
+        behavior: HitTestBehavior.translucent,
+        onTap: () {
+          launch("https://reddit.com/r/enteio");
+        },
+        child: SettingsTextItem(text: "Reddit", icon: Icons.navigate_next),
+      ),
+    ];
+    if (!UpdateService.instance.isIndependent()) {
+      options.addAll(
+        [
+          SectionOptionDivider,
+          GestureDetector(
+            behavior: HitTestBehavior.translucent,
+            onTap: () {
+              if (Platform.isAndroid) {
+                launch(
+                  "https://play.google.com/store/apps/details?id=io.ente.photos",
+                );
+              } else {
+                launch(
+                  "https://apps.apple.com/in/app/ente-photos/id1542026904",
+                );
+              }
+            },
+            child: SettingsTextItem(
+              text: "Rate us! ✨",
+              icon: Icons.navigate_next,
+            ),
+          )
+        ],
+      );
+    }
+    return Column(children: options);
   }
 }

+ 5 - 2
lib/ui/zoomable_live_image.dart

@@ -109,7 +109,10 @@ class _ZoomableLiveImageState extends State<ZoomableLiveImage>
       allowFullScreen: false,
       showControls: false,
     );
-    return Chewie(controller: _chewieController);
+    return Container(
+      child: Chewie(controller: _chewieController),
+      color: Colors.black, // same for both theme
+    );
   }
 
   Future<void> _loadLiveVideo() async {
@@ -142,7 +145,7 @@ class _ZoomableLiveImageState extends State<ZoomableLiveImage>
     if (videoFile != null && videoFile.existsSync()) {
       _setVideoPlayerController(file: videoFile);
     } else {
-      showShortToast(context, "download failed");
+      showShortToast(context, "Download failed");
     }
     _isLoadingVideoPlayer = false;
   }