Display double tap seek progress

This commit is contained in:
WardPearce
2025-12-28 14:49:05 +13:00
parent 22ae82223c
commit e49bd0d7a3
16 changed files with 14246 additions and 14240 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
apply plugin: 'com.android.application'
android {
namespace "us.materialio.app"
compileSdk rootProject.ext.compileSdkVersion
namespace = "us.materialio.app"
compileSdk = rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "us.materialio.app"
minSdkVersion rootProject.ext.minSdkVersion
@@ -13,7 +13,7 @@ android {
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
@@ -10,7 +10,7 @@
android:theme="@style/AppTheme">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation|density"
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch"
+2 -2
View File
@@ -6,8 +6,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.10.1'
classpath 'com.google.gms:google-services:4.4.2'
classpath 'com.android.tools.build:gradle:8.13.0'
classpath 'com.google.gms:google-services:4.4.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Binary file not shown.
+14 -11
View File
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
@@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -83,7 +85,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -111,7 +114,7 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@@ -144,7 +147,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -152,7 +155,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -201,16 +204,16 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
+14 -12
View File
@@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
@@ -57,22 +59,22 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
+13 -13
View File
@@ -1,16 +1,16 @@
ext {
minSdkVersion = 23
compileSdkVersion = 35
targetSdkVersion = 35
androidxActivityVersion = '1.9.2'
androidxAppCompatVersion = '1.7.0'
androidxCoordinatorLayoutVersion = '1.2.0'
androidxCoreVersion = '1.15.0'
androidxFragmentVersion = '1.8.4'
coreSplashScreenVersion = '1.0.1'
androidxWebkitVersion = '1.12.1'
minSdkVersion = 24
compileSdkVersion = 36
targetSdkVersion = 36
androidxActivityVersion = '1.11.0'
androidxAppCompatVersion = '1.7.1'
androidxCoordinatorLayoutVersion = '1.3.0'
androidxCoreVersion = '1.17.0'
androidxFragmentVersion = '1.8.9'
coreSplashScreenVersion = '1.2.0'
androidxWebkitVersion = '1.14.0'
junitVersion = '4.13.2'
androidxJunitVersion = '1.2.1'
androidxEspressoCoreVersion = '3.6.1'
cordovaAndroidVersion = '10.1.1'
androidxJunitVersion = '1.3.0'
androidxEspressoCoreVersion = '3.7.0'
cordovaAndroidVersion = '14.0.1'
}
+3
View File
@@ -7,6 +7,9 @@ const config: CapacitorConfig = {
plugins: {
CapacitorNodeJS: {
nodeDir: 'nodejs-android'
},
SystemBars: {
insetsHandling: 'disable'
}
},
server: {
@@ -7,6 +7,9 @@ const config: CapacitorConfig = {
plugins: {
CapacitorNodeJS: {
nodeDir: 'nodejs-android'
},
SystemBars: {
insetsHandling: 'disable'
}
},
server: {
+14028 -14071
View File
File diff suppressed because it is too large Load Diff
+78 -78
View File
@@ -1,79 +1,79 @@
{
"name": "materialious",
"version": "1.12.9",
"private": true,
"scripts": {
"dev": "npm run patch:github && vite dev",
"build": "npm run patch:github && vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"eslint": "eslint .",
"format": "prettier --write .",
"patch:shaka": "node ./scripts/patchShaka.mjs",
"patch:github": "node ./scripts/githubContributors.mjs",
"postinstall": "npm run patch:shaka"
},
"devDependencies": {
"@capacitor/assets": "^3.0.5",
"@capacitor/cli": "^7.4.4",
"@sveltejs/adapter-auto": "^6.0.1",
"@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.49.1",
"@sveltejs/vite-plugin-svelte": "^6.2.1",
"@types/event-source-polyfill": "^1.0.5",
"@types/he": "^1.2.3",
"@types/human-number": "^1.0.2",
"@types/mousetrap": "^1.6.15",
"@vite-pwa/sveltekit": "^1.0.0",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^3.13.0",
"patch-package": "^8.0.1",
"prettier": "^3.6.2",
"prettier-plugin-svelte": "^3.4.0",
"svelte": "^5.45.6",
"svelte-check": "^4.3.3",
"tslib": "^2.7.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.47.0",
"vite": "^7.2.6"
},
"type": "module",
"dependencies": {
"@capacitor-community/electron": "^5.0.1",
"@capacitor-community/safe-area": "^7.0.0-alpha.1",
"@capacitor/android": "^7.4.4",
"@capacitor/app": "^7.1.0",
"@capacitor/browser": "^7.0.0",
"@capacitor/clipboard": "^7.0.0",
"@capacitor/core": "^7.4.4",
"@capacitor/preferences": "^7.0.2",
"@capacitor/screen-orientation": "^7.0.0",
"@capacitor/share": "^7.0.2",
"@macfja/serializer": "^1.1.4",
"@macfja/svelte-persistent-store": "^2.4.2",
"beercss": "^3.13.1",
"bgutils-js": "^3.2.0",
"capacitor-music-controls-plugin": "^6.1.0",
"capacitor-nodejs": "https://github.com/hampoelz/capacitor-nodejs/releases/download/v1.0.0-beta.9/capacitor-nodejs.tgz",
"dayjs": "^1.11.19",
"dexie": "^4.2.1",
"fuse.js": "^7.0.0",
"googlevideo": "^4.0.4",
"he": "^1.2.0",
"human-number": "^2.0.8",
"i18next": "^25.7.2",
"iso-3166": "^4.4.0",
"iso-639-1": "^3.1.5",
"material-dynamic-colors": "^1.1.1",
"media-captions": "^1.0.4",
"mousetrap": "^1.6.5",
"peerjs": "^1.5.5",
"shaka-player": "^4.16.11",
"sponsorblock-api": "^0.2.4",
"svelte-infinite-loading": "^1.4.0",
"youtubei.js": "^16.0.1"
}
}
"name": "materialious",
"version": "1.12.9",
"private": true,
"scripts": {
"dev": "npm run patch:github && vite dev",
"build": "npm run patch:github && vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"eslint": "eslint .",
"format": "prettier --write .",
"patch:shaka": "node ./scripts/patchShaka.mjs",
"patch:github": "node ./scripts/githubContributors.mjs",
"postinstall": "npm run patch:shaka"
},
"devDependencies": {
"@capacitor/assets": "^3.0.5",
"@capacitor/cli": "^8.0.0",
"@sveltejs/adapter-auto": "^6.0.1",
"@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.49.1",
"@sveltejs/vite-plugin-svelte": "^6.2.1",
"@types/event-source-polyfill": "^1.0.5",
"@types/he": "^1.2.3",
"@types/human-number": "^1.0.2",
"@types/mousetrap": "^1.6.15",
"@vite-pwa/sveltekit": "^1.0.0",
"eslint": "^9.39.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-svelte": "^3.13.0",
"patch-package": "^8.0.1",
"prettier": "^3.6.2",
"prettier-plugin-svelte": "^3.4.0",
"svelte": "^5.45.6",
"svelte-check": "^4.3.3",
"tslib": "^2.7.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.47.0",
"vite": "^7.2.6"
},
"type": "module",
"dependencies": {
"@capacitor-community/electron": "^5.0.1",
"@capacitor-community/safe-area": "^7.0.0-alpha.1",
"@capacitor/android": "^8.0.0",
"@capacitor/app": "^8.0.0",
"@capacitor/browser": "^8.0.0",
"@capacitor/clipboard": "^8.0.0",
"@capacitor/core": "^8.0.0",
"@capacitor/preferences": "^8.0.0",
"@capacitor/screen-orientation": "^8.0.0",
"@capacitor/share": "^8.0.0",
"@macfja/serializer": "^1.1.4",
"@macfja/svelte-persistent-store": "^2.4.2",
"beercss": "^3.13.1",
"bgutils-js": "^3.2.0",
"capacitor-music-controls-plugin": "^6.1.0",
"capacitor-nodejs": "https://github.com/hampoelz/capacitor-nodejs/releases/download/v1.0.0-beta.9/capacitor-nodejs.tgz",
"dayjs": "^1.11.19",
"dexie": "^4.2.1",
"fuse.js": "^7.0.0",
"googlevideo": "^4.0.4",
"he": "^1.2.0",
"human-number": "^2.0.8",
"i18next": "^25.7.2",
"iso-3166": "^4.4.0",
"iso-639-1": "^3.1.5",
"material-dynamic-colors": "^1.1.1",
"media-captions": "^1.0.4",
"mousetrap": "^1.6.5",
"peerjs": "^1.5.5",
"shaka-player": "^4.16.11",
"sponsorblock-api": "^0.2.4",
"svelte-infinite-loading": "^1.4.0",
"youtubei.js": "^16.0.1"
}
}
+1 -1
View File
@@ -25,7 +25,7 @@ async function main() {
}
// Write the data to a JSON file
fs.writeFileSync(path.join(__dirname, outputDir, outputFile), JSON.stringify(data));
fs.writeFileSync(path.join(outputDir, outputFile), JSON.stringify(data));
console.log('Github contributors fetched and written to', path.join(outputDir, outputFile));
} catch (error) {
console.error('Error fetching data:', error);
+75 -26
View File
@@ -3,7 +3,7 @@
import { getBestThumbnail } from '$lib/images';
import { padTime, videoLength } from '$lib/numbers';
import { type PhasedDescription } from '$lib/timestamps';
import { SafeArea } from '@capacitor-community/safe-area';
import { SafeArea, SystemBarsStyle, SystemBarsType } from '@capacitor-community/safe-area';
import { Capacitor } from '@capacitor/core';
import { ScreenOrientation, type ScreenOrientationResult } from '@capacitor/screen-orientation';
import { error, type Page } from '@sveltejs/kit';
@@ -43,7 +43,12 @@
} from '../store';
import { setStatusBarColor } from '../theme';
import { patchYoutubeJs } from '$lib/patches/youtubejs';
import { goToNextVideo, goToPreviousVideo, playbackRates } from '$lib/player';
import {
goToNextVideo,
goToPreviousVideo,
playbackRates,
playerDoubleTapSeek
} from '$lib/player';
import { dashManifestDomainInclusion } from '$lib/android/youtube/dash';
import { injectSabr } from '$lib/sabr';
import type { SabrStreamingAdapter } from 'googlevideo/sabr-streaming-adapter';
@@ -90,6 +95,12 @@
let playerTimelineMouseX: number = $state(0);
let playerTimelineLastUpdate: number = 0;
let clickCount = $state(0);
// eslint-disable-next-line no-undef
let clickCounterTimeout: NodeJS.Timeout;
let seekDirection: 'forwards' | 'backwards' = '';
const STORAGE_KEY_VOLUME = 'shaka-preferred-volume';
playertheatreModeIsActive.subscribe(async () => {
@@ -192,14 +203,14 @@
if (isFullScreen) {
// Ensure bar color is black while in fullscreen
await SafeArea.enable({
config: {
customColorsForSystemBars: true,
statusBarColor: '#00000000',
statusBarContent: 'light',
navigationBarColor: '#00000000',
navigationBarContent: 'light'
}
await SafeArea.setSystemBarsStyle({
style: SystemBarsStyle.Light
});
await SafeArea.hideSystemBars({
type: SystemBarsType.NavigationBar
});
await SafeArea.hideSystemBars({
type: SystemBarsType.StatusBar
});
} else {
await setStatusBarColor();
@@ -700,14 +711,14 @@
if (!$isAndroidTvStore) {
Mousetrap.bind('right', () => {
if (!playerElement) return;
playerElement.currentTime = playerElement.currentTime + 10;
playerElement.currentTime = playerElement.currentTime + playerDoubleTapSeek;
return false;
});
Mousetrap.bind('left', () => {
if (!playerElement) return;
playerElement.currentTime = playerElement.currentTime - 10;
playerElement.currentTime = playerElement.currentTime - playerDoubleTapSeek;
return false;
});
}
@@ -894,9 +905,6 @@
playerTimelineTooltipVisible = false;
}
let clickCount = $state(0);
// eslint-disable-next-line no-undef
let clickCounterTimeout: NodeJS.Timeout;
function onVideoClick(
event: MouseEvent & {
currentTarget: EventTarget & HTMLDivElement;
@@ -905,7 +913,7 @@
if (
event.target &&
event.target instanceof HTMLElement &&
event.target.id === 'player-center' &&
event.target.id === 'player-tap-controls-area' &&
parseFloat(getComputedStyle(event.target).opacity) > 0 &&
playerElement
) {
@@ -930,13 +938,15 @@
if (clickCount < 2) return;
if (clickX < width / 3) {
playerElement.currentTime = Math.max(0, playerElement.currentTime - 10);
seekDirection = 'backwards';
playerElement.currentTime = Math.max(0, playerElement.currentTime - playerDoubleTapSeek);
} else if (clickX < (2 * width) / 3) {
toggleFullscreen();
} else {
seekDirection = 'forwards';
playerElement.currentTime = Math.min(
playerElement.duration,
playerElement.currentTime + 10
playerElement.currentTime + playerDoubleTapSeek
);
}
}
@@ -954,6 +964,8 @@
}
}
await setStatusBarColor();
await CapacitorMusicControls.destroy();
}
@@ -1009,13 +1021,33 @@
</p>
{/if}
<div id="player-center">
{#if playerIsBuffering}
<progress class="circle large indeterminate" value="50" max="100"></progress>
{:else if !playerCurrentPlaybackState}
<button class="extra secondary" onclick={toggleVideoPlaybackStatus}>
<i>play_arrow</i>
</button>
{/if}
<div class="grid">
<div class="s4 m4 l4" id="player-tap-controls-area">
{#if clickCount > 1 && seekDirection === 'backwards'}
<div class="seek-double-click" id="player-tap-controls-area">
<h4 id="player-tap-controls-area">-{(clickCount - 1) * playerDoubleTapSeek}</h4>
</div>
{/if}
</div>
<div class="s4 m4 l4">
<div class="player-status" id="player-tap-controls-area">
{#if playerIsBuffering}
<progress class="circle large indeterminate" value="50" max="100"></progress>
{:else if !playerCurrentPlaybackState}
<button class="extra secondary" onclick={toggleVideoPlaybackStatus}>
<i>play_arrow</i>
</button>
{/if}
</div>
</div>
<div class="s4 m4 l4" id="player-tap-controls-area">
{#if clickCount > 1 && seekDirection === 'forwards'}
<div class="seek-double-click" id="player-tap-controls-area">
<h4 id="player-tap-controls-area">+{(clickCount - 1) * playerDoubleTapSeek}</h4>
</div>
{/if}
</div>
</div>
</div>
{#if !hideControls}
<div id="player-controls">
@@ -1330,9 +1362,13 @@
position: absolute;
width: 100%;
height: 100%;
}
.player-status {
display: flex;
align-items: center;
justify-content: center;
align-items: center;
height: var(--video-player-height);
}
#mobile-time {
@@ -1363,6 +1399,19 @@
transition: opacity 0.3s ease;
}
.seek-double-click {
background-color: var(--secondary-container);
height: var(--video-player-height);
color: var(--secondary);
width: 100%;
opacity: 0.8;
padding: 1em;
display: flex;
justify-content: center;
align-items: center;
user-select: none;
}
menu.mobile {
transform: scale(1) translateY(-40%) translateX(0);
width: 300px;
-9
View File
@@ -41,23 +41,14 @@ button,
}
nav.top {
padding-top: calc(var(--safe-area-inset-top) + 1rem) !important;
padding-bottom: 1em;
}
nav.bottom {
padding-bottom: var(--safe-area-inset-bottom) !important;
}
main.root {
max-height: 100vh;
overflow-y: auto;
}
dialog {
padding-top: calc(var(--safe-area-inset-top) + 1rem) !important;
}
.row {
padding: 1em !important;
}
+1
View File
@@ -25,6 +25,7 @@ export interface PlayerEvents {
}
export const playbackRates = [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3];
export const playerDoubleTapSeek = 10.0;
export function goToPreviousVideo(playlistId: string | null) {
const previousVideos = get(playerPlaylistHistory);
+10 -13
View File
@@ -2,7 +2,7 @@ import { Capacitor } from '@capacitor/core';
import ui from 'beercss';
import { tick } from 'svelte';
import { get } from 'svelte/store';
import { SafeArea } from '@capacitor-community/safe-area';
import { SafeArea, SystemBarsStyle, SystemBarsType } from '@capacitor-community/safe-area';
import { darkModeStore, interfaceAmoledTheme } from './store';
export async function getDynamicTheme(mode?: string): Promise<Record<string, string>> {
@@ -23,20 +23,17 @@ export async function setStatusBarColor() {
await tick();
const surfaceColor = get(interfaceAmoledTheme)
? '#000000'
: (await getDynamicTheme())['--surface-container'];
const barStyle = !get(darkModeStore) ? SystemBarsStyle.Dark : SystemBarsStyle.Light;
const contentColor = !get(darkModeStore) ? 'dark' : 'light';
await SafeArea.setSystemBarsStyle({
style: barStyle
});
await SafeArea.enable({
config: {
customColorsForSystemBars: true,
statusBarColor: surfaceColor,
statusBarContent: contentColor,
navigationBarColor: surfaceColor,
navigationBarContent: contentColor
}
await SafeArea.showSystemBars({
type: SystemBarsType.NavigationBar
});
await SafeArea.showSystemBars({
type: SystemBarsType.StatusBar
});
}