Skip to content

Commit

Permalink
feat: add 'screen_orientation: unlock' action
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmcquade committed Nov 7, 2024
1 parent 8b18b2b commit 72e5314
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SyncServiceBase } from "../syncService.base";
import { environment } from "src/environments/environment";

/** List of possible orientations provided by authors */
const SCREEN_ORIENTATIONS = ["portrait", "landscape"] as const;
const SCREEN_ORIENTATIONS = ["portrait", "landscape", "unlock"] as const;

type IScreenOrientation = (typeof SCREEN_ORIENTATIONS)[number];

Expand Down Expand Up @@ -54,7 +54,7 @@ export class ScreenOrientationService extends SyncServiceBase {

this.lockedOrientation = orientation;

if (orientation) {
if (orientation && orientation !== "unlock") {
if (SCREEN_ORIENTATIONS.includes(orientation)) {
console.log(`[SCREEN ORIENTATION] - Lock ${orientation}`);
return ScreenOrientation.lock({ orientation });
Expand Down

0 comments on commit 72e5314

Please sign in to comment.