From 05d5e6c05d812a8f9207229fa7e003c1b37eab8d Mon Sep 17 00:00:00 2001
From: infinite-persistence
<64950861+infinite-persistence@users.noreply.github.com>
Date: Tue, 14 Dec 2021 18:09:24 -0800
Subject: [PATCH 1/2] Remove old mobile chromecast css hack (#7352)
lbry-desktop--6844
This negates 49abbecb.
Now that we have a dedicated chromecast button, we don't need to hack Chrome's default cast button to appear on top of vjs-mobile-ui. The hack no longer works anyway, since the CSS exposure has been deprecated around mid 2020 -- it is still available, but its abilities has become less and less.
---
.../plugins/videojs-mobile-ui/touchOverlay.js | 23 +-----------
ui/scss/component/_file-render.scss | 36 -------------------
2 files changed, 1 insertion(+), 58 deletions(-)
diff --git a/ui/component/viewers/videoViewer/internal/plugins/videojs-mobile-ui/touchOverlay.js b/ui/component/viewers/videoViewer/internal/plugins/videojs-mobile-ui/touchOverlay.js
index 00fe9271d..8dd112926 100644
--- a/ui/component/viewers/videoViewer/internal/plugins/videojs-mobile-ui/touchOverlay.js
+++ b/ui/component/viewers/videoViewer/internal/plugins/videojs-mobile-ui/touchOverlay.js
@@ -34,7 +34,7 @@ class TouchOverlay extends Component {
this.addChild('playToggle', {});
// Clear overlay when playback starts or with control fade
- player.on(['playing', 'userinactive'], e => {
+ player.on(['playing', 'userinactive'], (e) => {
if (!this.player_.paused()) {
this.removeClass('show-play-toggle');
}
@@ -104,27 +104,6 @@ class TouchOverlay extends Component {
handleSingleTap(event) {
this.removeClass('skip');
this.toggleClass('show-play-toggle');
-
- // At the moment, we only have one
- {/* @endif */}
-
- {/* @if TARGET='app' */}
)}
- {/* @endif */}
-
- {/* @if TARGET='app' */}
- {/* @endif */}
-
{
+ if (persistDone) {
+ const state = store.getState();
+ const enabled = makeSelectClientSetting(SETTINGS.ENABLE_PRERELEASE_UPDATES)(state);
+ if (enabled) {
+ autoUpdater.allowPrerelease = true;
+ }
+ }
+ }, [persistDone]);
+
useEffect(() => {
// @if TARGET='app'
moment.locale(remote.app.getLocale());
diff --git a/ui/redux/reducers/settings.js b/ui/redux/reducers/settings.js
index 966c61d36..7dcdf1c65 100644
--- a/ui/redux/reducers/settings.js
+++ b/ui/redux/reducers/settings.js
@@ -80,6 +80,7 @@ const defaultState = {
// OS
[SETTINGS.AUTO_LAUNCH]: true,
[SETTINGS.TO_TRAY_WHEN_CLOSED]: true,
+ [SETTINGS.ENABLE_PRERELEASE_UPDATES]: false,
},
};
defaultState.clientSettings[SETTINGS.AUTOPLAY_NEXT] = defaultState.clientSettings[SETTINGS.AUTOPLAY_MEDIA];
--
2.45.2