From 36d254f34560dea2a52f817810159ad730435384 Mon Sep 17 00:00:00 2001 From: Ahmed El-Helw Date: Sun, 15 Dec 2024 21:22:19 +0400 Subject: [PATCH] Use dark mode as the default For now, set the default mode to be dark mode. In the future, in sha' Allah, there will be a setting for either day, night, or follow system. For people who have the app installed, it will default to dark. For new installations, it'll follow system by default. This will be in the future though, in sha' Allah. --- .../main/java/com/quran/labs/androidquran/QuranApplication.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/com/quran/labs/androidquran/QuranApplication.kt b/app/src/main/java/com/quran/labs/androidquran/QuranApplication.kt index c3fb985be0..613f6f4bd5 100644 --- a/app/src/main/java/com/quran/labs/androidquran/QuranApplication.kt +++ b/app/src/main/java/com/quran/labs/androidquran/QuranApplication.kt @@ -3,6 +3,7 @@ package com.quran.labs.androidquran import android.app.Application import android.content.Context import android.content.res.Resources +import androidx.appcompat.app.AppCompatDelegate import androidx.work.Configuration import androidx.work.WorkManager import com.quran.labs.androidquran.core.worker.QuranWorkerFactory @@ -34,6 +35,9 @@ open class QuranApplication : Application(), QuranApplicationComponentProvider { applicationComponent.inject(this) initializeWorkManager() bookmarksWidgetSubscriber.subscribeBookmarksWidgetIfNecessary() + + // set dark mode as the default for now + AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES) } open fun setupTimber() {