Skip to content

Commit

Permalink
Removes uncleaned up reference to isAndroidWebview.
Browse files Browse the repository at this point in the history
No longer needed as the android app supports full screening now.
  • Loading branch information
rtibbles committed Jan 19, 2024
1 parent 0f182a3 commit 5bc2159
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions kolibri/core/assets/src/views/CoreFullscreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<script>
import ScreenFull from 'screenfull';
import { isAndroidWebView } from 'kolibri.utils.browserInfo';
const fullscreenApiIsSupported = ScreenFull.isEnabled && !isAndroidWebView;
const NORMALIZE_FULLSCREEN_CLASS = 'normalize-fullscreen';
const MIMIC_FULLSCREEN_CLASS = 'mimic-fullscreen';
Expand All @@ -32,7 +29,7 @@
computed: {
fullscreenClass() {
if (this.isInFullscreen) {
return fullscreenApiIsSupported ? NORMALIZE_FULLSCREEN_CLASS : MIMIC_FULLSCREEN_CLASS;
return ScreenFull.isEnabled ? NORMALIZE_FULLSCREEN_CLASS : MIMIC_FULLSCREEN_CLASS;
}
return null;
},
Expand All @@ -46,7 +43,7 @@
},
mounted() {
// Catch the use of the esc key to exit fullscreen
if (fullscreenApiIsSupported) {
if (ScreenFull.isEnabled) {
ScreenFull.onchange(() => {
this.isInFullscreen = ScreenFull.isFullscreen;
});
Expand All @@ -60,13 +57,13 @@
if (!this.toggling) {
let fullScreenPromise;
this.toggling = true;
if (fullscreenApiIsSupported) {
if (ScreenFull.isEnabled) {
fullScreenPromise = ScreenFull.toggle(this.$refs.fullscreen);
} else {
fullScreenPromise = Promise.resolve();
}
fullScreenPromise.then(() => {
this.isInFullscreen = fullscreenApiIsSupported
this.isInFullscreen = ScreenFull.isEnabled
? ScreenFull.isFullscreen
: !this.isInFullscreen;
this.toggling = false;
Expand Down

0 comments on commit 5bc2159

Please sign in to comment.