Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
b2288c8
New translations strings.xml (Arabic)
sameerasw May 17, 2026
77acf8e
New translations strings.xml (German)
sameerasw May 17, 2026
ed6a591
New translations strings.xml (Hebrew)
sameerasw May 17, 2026
88952e2
New translations strings.xml (Italian)
sameerasw May 17, 2026
bbd50a8
New translations strings.xml (Japanese)
sameerasw May 17, 2026
d29abce
New translations strings.xml (Polish)
sameerasw May 17, 2026
1d139ce
New translations strings.xml (Russian)
sameerasw May 17, 2026
74f61f6
New translations strings.xml (Portuguese, Brazilian)
sameerasw May 17, 2026
81bbbed
New translations strings.xml (English)
sameerasw May 17, 2026
63d7bec
New translations strings.xml (Romanian)
sameerasw May 17, 2026
18b6970
New translations strings.xml (French)
sameerasw May 17, 2026
bcac476
New translations strings.xml (Spanish)
sameerasw May 17, 2026
0a13c4c
New translations strings.xml (Afrikaans)
sameerasw May 17, 2026
96560ca
New translations strings.xml (Catalan)
sameerasw May 17, 2026
8e97708
New translations strings.xml (Czech)
sameerasw May 17, 2026
0020959
New translations strings.xml (Danish)
sameerasw May 17, 2026
c02bd50
New translations strings.xml (Greek)
sameerasw May 17, 2026
cdc0a90
New translations strings.xml (Finnish)
sameerasw May 17, 2026
1d97f2a
New translations strings.xml (Hungarian)
sameerasw May 17, 2026
69e5534
New translations strings.xml (Korean)
sameerasw May 17, 2026
eee40cd
New translations strings.xml (Dutch)
sameerasw May 17, 2026
535bea6
New translations strings.xml (Norwegian)
sameerasw May 17, 2026
fe4c51d
New translations strings.xml (Serbian (Cyrillic))
sameerasw May 17, 2026
2963c1a
New translations strings.xml (Swedish)
sameerasw May 17, 2026
a8cce76
New translations strings.xml (Turkish)
sameerasw May 17, 2026
b170f15
New translations strings.xml (Ukrainian)
sameerasw May 17, 2026
502295e
New translations strings.xml (Chinese Traditional)
sameerasw May 17, 2026
0b4e469
New translations strings.xml (Vietnamese)
sameerasw May 17, 2026
b902df0
New translations strings.xml (Sinhala)
sameerasw May 17, 2026
03caef4
New translations strings.xml (Acholi)
sameerasw May 17, 2026
e1fa0b4
New translations strings.xml (Spanish)
sameerasw May 17, 2026
ec32a3c
New translations strings.xml (Arabic)
sameerasw May 17, 2026
9f302ee
New translations strings.xml (German)
sameerasw May 17, 2026
67e5d67
New translations strings.xml (Hebrew)
sameerasw May 17, 2026
973578c
New translations strings.xml (Italian)
sameerasw May 17, 2026
011daf8
New translations strings.xml (Japanese)
sameerasw May 17, 2026
fb8b4bb
New translations strings.xml (Polish)
sameerasw May 17, 2026
4d798a4
New translations strings.xml (Russian)
sameerasw May 17, 2026
46d7b19
New translations strings.xml (Portuguese, Brazilian)
sameerasw May 17, 2026
f18fd4e
New translations strings.xml (English)
sameerasw May 17, 2026
b77f81c
New translations strings.xml (Romanian)
sameerasw May 17, 2026
ae1dd54
New translations strings.xml (French)
sameerasw May 17, 2026
42d2230
New translations strings.xml (Spanish)
sameerasw May 17, 2026
b0fbf2a
New translations strings.xml (Afrikaans)
sameerasw May 17, 2026
c0b64d4
New translations strings.xml (Catalan)
sameerasw May 17, 2026
6c42a30
New translations strings.xml (Czech)
sameerasw May 17, 2026
ebe6467
New translations strings.xml (Danish)
sameerasw May 17, 2026
583880c
New translations strings.xml (Greek)
sameerasw May 17, 2026
1a469ce
New translations strings.xml (Finnish)
sameerasw May 17, 2026
bbf33d4
New translations strings.xml (Hungarian)
sameerasw May 17, 2026
a622393
New translations strings.xml (Korean)
sameerasw May 17, 2026
dc8dc66
New translations strings.xml (Dutch)
sameerasw May 17, 2026
302ce3a
New translations strings.xml (Norwegian)
sameerasw May 17, 2026
bc94aa2
New translations strings.xml (Portuguese)
sameerasw May 17, 2026
f349871
New translations strings.xml (Serbian (Cyrillic))
sameerasw May 17, 2026
e02d3a0
New translations strings.xml (Swedish)
sameerasw May 17, 2026
3fa112b
New translations strings.xml (Turkish)
sameerasw May 17, 2026
946c57f
New translations strings.xml (Ukrainian)
sameerasw May 17, 2026
33ea173
New translations strings.xml (Chinese Simplified)
sameerasw May 17, 2026
5d408de
New translations strings.xml (Chinese Traditional)
sameerasw May 17, 2026
bdf3ec3
New translations strings.xml (Vietnamese)
sameerasw May 17, 2026
e2eab32
New translations strings.xml (Sinhala)
sameerasw May 17, 2026
3f15302
New translations strings.xml (Acholi)
sameerasw May 17, 2026
94c18e7
Merge branch 'develop' into l10n_develop
sameerasw May 17, 2026
0926ccc
New Crowdin updates (#437)
sameerasw May 17, 2026
1748338
refactor: Refactor and optimizations
sameerasw May 17, 2026
be9457b
Merge branch 'main' into develop
sameerasw May 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Offset
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
import androidx.compose.ui.input.nestedscroll.NestedScrollSource
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalView
Expand All @@ -44,26 +48,32 @@ import androidx.lifecycle.viewmodel.compose.viewModel
import com.sameerasw.essentials.domain.HapticFeedbackType
import com.sameerasw.essentials.domain.registry.FeatureRegistry
import com.sameerasw.essentials.ui.components.EssentialsFloatingToolbar
import com.sameerasw.essentials.ui.components.animations.LottieFeatureAnimation
import com.sameerasw.essentials.ui.components.cards.FeatureCard
import com.sameerasw.essentials.ui.components.containers.RoundedCardContainer
import com.sameerasw.essentials.ui.components.linkActions.LinkPickerScreen
import com.sameerasw.essentials.ui.components.sheets.PermissionsBottomSheet
import com.sameerasw.essentials.ui.composables.configs.AlwaysOnDisplaySettingsUI
import com.sameerasw.essentials.ui.composables.configs.EssentialsOnDisplaySettingsUI
import com.sameerasw.essentials.ui.composables.configs.AppLockSettingsUI
import com.sameerasw.essentials.ui.composables.configs.BatteriesSettingsUI
import com.sameerasw.essentials.ui.composables.configs.BatteryNotificationSettingsUI
import com.sameerasw.essentials.ui.composables.configs.ButtonRemapSettingsUI
import com.sameerasw.essentials.ui.composables.configs.CaffeinateSettingsUI
import com.sameerasw.essentials.ui.composables.configs.CalendarSyncSettingsUI
import com.sameerasw.essentials.ui.composables.configs.DynamicNightLightSettingsUI
import com.sameerasw.essentials.ui.composables.configs.EssentialsOnDisplaySettingsUI
import com.sameerasw.essentials.ui.composables.configs.FlashlightPulseSettingsUI
import com.sameerasw.essentials.ui.composables.configs.FreezeSettingsUI
import com.sameerasw.essentials.ui.composables.configs.KeyboardSettingsUI
import com.sameerasw.essentials.ui.composables.configs.LiveWallpaperSettingsUI
import com.sameerasw.essentials.ui.composables.configs.LocationReachedSettingsUI
import com.sameerasw.essentials.ui.composables.configs.LockScreenClockSettingsUI
import com.sameerasw.essentials.ui.composables.configs.MapsPowerSavingSettingsUI
import com.sameerasw.essentials.ui.composables.configs.NotificationLightingSettingsUI
import com.sameerasw.essentials.ui.composables.configs.OtherCustomizationsSettingsUI
import com.sameerasw.essentials.ui.composables.configs.QuickSettingsTilesSettingsUI
import com.sameerasw.essentials.ui.composables.configs.RefreshRateSettingsUI
import com.sameerasw.essentials.ui.composables.configs.RemoteLockSettingsUI
import com.sameerasw.essentials.ui.composables.configs.ScreenLockedSecuritySettingsUI
import com.sameerasw.essentials.ui.composables.configs.ScreenOffWidgetSettingsUI
import com.sameerasw.essentials.ui.composables.configs.ShutUpSettingsUI
Expand All @@ -72,26 +82,16 @@ import com.sameerasw.essentials.ui.composables.configs.SoundModeTileSettingsUI
import com.sameerasw.essentials.ui.composables.configs.StatusBarIconSettingsUI
import com.sameerasw.essentials.ui.composables.configs.TextAnimationsSettingsUI
import com.sameerasw.essentials.ui.composables.configs.WatchSettingsUI
import com.sameerasw.essentials.ui.composables.configs.FreezeSettingsUI
import com.sameerasw.essentials.ui.composables.configs.CalendarSyncSettingsUI
import com.sameerasw.essentials.ui.composables.configs.RemoteLockSettingsUI
import com.sameerasw.essentials.ui.composables.configs.FlashlightPulseSettingsUI
import com.sameerasw.essentials.ui.composables.configs.LockScreenClockSettingsUI
import com.sameerasw.essentials.ui.components.animations.LottieFeatureAnimation
import com.sameerasw.essentials.ui.modifiers.BlurDirection
import com.sameerasw.essentials.ui.modifiers.progressiveBlur
import com.sameerasw.essentials.ui.theme.EssentialsTheme
import com.sameerasw.essentials.utils.BiometricSecurityHelper
import com.sameerasw.essentials.utils.HapticUtil
import com.sameerasw.essentials.viewmodels.CaffeinateViewModel
import com.sameerasw.essentials.viewmodels.MainViewModel
import com.sameerasw.essentials.viewmodels.StatusBarIconViewModel
import com.sameerasw.essentials.viewmodels.WatchViewModel
import kotlinx.coroutines.delay
import androidx.compose.ui.input.nestedscroll.NestedScrollConnection
import androidx.compose.ui.input.nestedscroll.NestedScrollSource
import androidx.compose.ui.input.nestedscroll.nestedScroll
import androidx.compose.ui.geometry.Offset
import com.sameerasw.essentials.utils.HapticUtil

@OptIn(ExperimentalMaterial3Api::class)
class FeatureSettingsActivity : AppCompatActivity() {
Expand Down Expand Up @@ -353,7 +353,10 @@ class FeatureSettingsActivity : AppCompatActivity() {

val nestedScrollConnection = remember {
object : NestedScrollConnection {
override fun onPreScroll(available: Offset, source: NestedScrollSource): Offset {
override fun onPreScroll(
available: Offset,
source: NestedScrollSource
): Offset {
val delta = available.y
if (delta < 0 && headerHeight > minHeaderHeight) {
val oldHeight = headerHeight
Expand All @@ -377,11 +380,11 @@ class FeatureSettingsActivity : AppCompatActivity() {
headerHeight = with(density) {
(oldHeight.toPx() + delta).toDp()
}.coerceAtMost(maxHeaderHeight)

if (headerHeight == maxHeaderHeight && oldHeight < maxHeaderHeight) {
HapticUtil.performLightHaptic(view)
}

val produced = headerHeight - oldHeight
return Offset(0f, with(density) { produced.toPx() })
}
Expand Down Expand Up @@ -416,7 +419,11 @@ class FeatureSettingsActivity : AppCompatActivity() {
height = with(LocalDensity.current) { 150.dp.toPx() },
direction = BlurDirection.BOTTOM
)
.then(if (hasScroll) Modifier.nestedScroll(nestedScrollConnection).verticalScroll(rememberScrollState()) else Modifier)
.then(
if (hasScroll) Modifier
.nestedScroll(nestedScrollConnection)
.verticalScroll(rememberScrollState()) else Modifier
)
) {
// Top padding for status bar
if (featureId != "Quick settings tiles" && featureId != "Location reached") {
Expand Down
37 changes: 2 additions & 35 deletions app/src/main/java/com/sameerasw/essentials/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,19 @@ import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.animation.togetherWith
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.asPaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBars
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.Button
import androidx.compose.material3.CircularWavyProgressIndicator
import androidx.compose.material3.FloatingActionButton
import androidx.compose.material3.FloatingToolbarDefaults
import androidx.compose.material3.FloatingToolbarExitDirection.Companion.Bottom
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ProgressIndicatorDefaults
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
Expand All @@ -61,9 +45,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.alpha
import androidx.compose.ui.draw.clip
import androidx.compose.ui.draw.scale
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.compose.ui.res.painterResource
Expand All @@ -73,16 +55,11 @@ import androidx.compose.ui.zIndex
import androidx.core.animation.doOnEnd
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.WindowCompat
import coil.compose.AsyncImage
import com.sameerasw.essentials.data.repository.SettingsRepository
import com.sameerasw.essentials.domain.DIYTabs
import com.sameerasw.essentials.domain.registry.initPermissionRegistry
import com.sameerasw.essentials.ui.components.EssentialsFloatingToolbar
import com.sameerasw.essentials.ui.components.ToolbarItem
import com.sameerasw.essentials.ui.components.cards.TrackedRepoCard
import com.sameerasw.essentials.ui.components.containers.RoundedCardContainer
import com.sameerasw.essentials.ui.components.menus.SegmentedDropdownMenu
import com.sameerasw.essentials.ui.components.menus.SegmentedDropdownMenuItem
import com.sameerasw.essentials.ui.components.sheets.AddRepoBottomSheet
import com.sameerasw.essentials.ui.components.sheets.GitHubAuthSheet
import com.sameerasw.essentials.ui.components.sheets.InstructionsBottomSheet
Expand All @@ -101,9 +78,6 @@ import com.sameerasw.essentials.viewmodels.GitHubAuthViewModel
import com.sameerasw.essentials.viewmodels.LocationReachedViewModel
import com.sameerasw.essentials.viewmodels.MainViewModel
import kotlinx.coroutines.launch
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale

class MainActivity : AppCompatActivity() {
val viewModel: MainViewModel by viewModels()
Expand Down Expand Up @@ -254,7 +228,6 @@ class MainActivity : AppCompatActivity() {

var showGitHubAuthSheet by remember { mutableStateOf(false) }
var showNewAutomationSheet by remember { mutableStateOf(false) }
var showFabProfileMenu by remember { mutableStateOf(false) }
val gitHubToken by viewModel.gitHubToken
val gitHubUser by gitHubAuthViewModel.currentUser
val isOnboardingCompleted by viewModel.isOnboardingCompleted
Expand Down Expand Up @@ -368,19 +341,13 @@ class MainActivity : AppCompatActivity() {
)
}

val refreshingRepoIds by updatesViewModel.refreshingRepoIds
val updateProgress by updatesViewModel.updateProgress
val animatedProgress by animateFloatAsState(
targetValue = if (updateProgress > 0) updateProgress else 0f,
animationSpec = ProgressIndicatorDefaults.ProgressAnimationSpec,
label = "Progress"
)

var showAddRepoSheet by remember { mutableStateOf(false) }
var repoToShowReleaseNotesFullName by remember { mutableStateOf<String?>(null) }
val trackedRepos by updatesViewModel.trackedRepos

val exportLauncher = rememberLauncherForActivityResult(
rememberLauncherForActivityResult(
contract = ActivityResultContracts.CreateDocument("application/json")
) { uri ->
uri?.let {
Expand All @@ -395,7 +362,7 @@ class MainActivity : AppCompatActivity() {
}
}

val importLauncher = rememberLauncherForActivityResult(
rememberLauncherForActivityResult(
contract = ActivityResultContracts.OpenDocument()
) { uri ->
uri?.let {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,10 @@ class SettingsRepository(private val context: Context) {
const val KEY_AMBIENT_MUSIC_GLANCE_CLOCK_WEIGHT = "ambient_music_glance_clock_weight"
const val KEY_AMBIENT_MUSIC_GLANCE_CLOCK_WIDTH = "ambient_music_glance_clock_width"
const val KEY_AMBIENT_MUSIC_GLANCE_CLOCK_ROUNDNESS = "ambient_music_glance_clock_roundness"
const val KEY_AMBIENT_MUSIC_GLANCE_FORCE_FILL_WHILE_CHARGING = "ambient_music_glance_force_fill_while_charging"
const val KEY_AMBIENT_MUSIC_GLANCE_RESPECT_NOTIFICATIONS = "ambient_music_glance_respect_notifications"
const val KEY_AMBIENT_MUSIC_GLANCE_FORCE_FILL_WHILE_CHARGING =
"ambient_music_glance_force_fill_while_charging"
const val KEY_AMBIENT_MUSIC_GLANCE_RESPECT_NOTIFICATIONS =
"ambient_music_glance_respect_notifications"
const val KEY_CALENDAR_SYNC_ENABLED = "calendar_sync_enabled"
const val KEY_CALENDAR_SYNC_SELECTED_CALENDARS = "calendar_sync_selected_calendars"
const val KEY_CALENDAR_SYNC_PERIODIC_ENABLED = "calendar_sync_periodic_enabled"
Expand Down Expand Up @@ -1163,7 +1165,11 @@ class SettingsRepository(private val context: Context) {
shouldRestoreInfinityPeakOnRefreshRateReset()
)
} else if (mode == com.sameerasw.essentials.utils.RefreshRateUtils.MODE_RANGE && min > 0f && peak > 0f) {
com.sameerasw.essentials.utils.RefreshRateUtils.applyRangeRefreshRate(context, min, peak)
com.sameerasw.essentials.utils.RefreshRateUtils.applyRangeRefreshRate(
context,
min,
peak
)
} else if (fixed > 0f || peak > 0f) {
com.sameerasw.essentials.utils.RefreshRateUtils.applyFixedRefreshRate(
context,
Expand Down Expand Up @@ -1243,30 +1249,52 @@ class SettingsRepository(private val context: Context) {
val json = gson.toJson(presets)
putString(KEY_PRIVATE_DNS_PRESETS, json)
}

fun resetPrivateDnsPresets() {
savePrivateDnsPresets(getDefaultDnsPresets())
}

fun getAmbientMusicGlanceAlbumArtMode(): String = prefs.getString(KEY_AMBIENT_MUSIC_GLANCE_ALBUM_ART_MODE, "default") ?: "default"
fun setAmbientMusicGlanceAlbumArtMode(mode: String) = prefs.edit().putString(KEY_AMBIENT_MUSIC_GLANCE_ALBUM_ART_MODE, mode).apply()
fun getAmbientMusicGlanceAlbumArtMode(): String =
prefs.getString(KEY_AMBIENT_MUSIC_GLANCE_ALBUM_ART_MODE, "default") ?: "default"

fun setAmbientMusicGlanceAlbumArtMode(mode: String) =
prefs.edit().putString(KEY_AMBIENT_MUSIC_GLANCE_ALBUM_ART_MODE, mode).apply()

fun getAmbientMusicGlanceClockSize(): Int =
prefs.getInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_SIZE, 80)

fun setAmbientMusicGlanceClockSize(size: Int) =
prefs.edit().putInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_SIZE, size).apply()

fun getAmbientMusicGlanceClockWeight(): Int =
prefs.getInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_WEIGHT, 400)

fun setAmbientMusicGlanceClockWeight(weight: Int) =
prefs.edit().putInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_WEIGHT, weight).apply()

fun getAmbientMusicGlanceClockWidth(): Int =
prefs.getInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_WIDTH, 100)

fun setAmbientMusicGlanceClockWidth(width: Int) =
prefs.edit().putInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_WIDTH, width).apply()

fun getAmbientMusicGlanceClockSize(): Int = prefs.getInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_SIZE, 80)
fun setAmbientMusicGlanceClockSize(size: Int) = prefs.edit().putInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_SIZE, size).apply()
fun getAmbientMusicGlanceClockRoundness(): Int =
prefs.getInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_ROUNDNESS, 50)

fun getAmbientMusicGlanceClockWeight(): Int = prefs.getInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_WEIGHT, 400)
fun setAmbientMusicGlanceClockWeight(weight: Int) = prefs.edit().putInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_WEIGHT, weight).apply()
fun setAmbientMusicGlanceClockRoundness(roundness: Int) =
prefs.edit().putInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_ROUNDNESS, roundness).apply()

fun getAmbientMusicGlanceClockWidth(): Int = prefs.getInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_WIDTH, 100)
fun setAmbientMusicGlanceClockWidth(width: Int) = prefs.edit().putInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_WIDTH, width).apply()
fun isAmbientMusicGlanceForceFillWhileChargingEnabled(): Boolean =
prefs.getBoolean(KEY_AMBIENT_MUSIC_GLANCE_FORCE_FILL_WHILE_CHARGING, false)

fun getAmbientMusicGlanceClockRoundness(): Int = prefs.getInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_ROUNDNESS, 50)
fun setAmbientMusicGlanceClockRoundness(roundness: Int) = prefs.edit().putInt(KEY_AMBIENT_MUSIC_GLANCE_CLOCK_ROUNDNESS, roundness).apply()
fun setAmbientMusicGlanceForceFillWhileChargingEnabled(enabled: Boolean) =
prefs.edit().putBoolean(KEY_AMBIENT_MUSIC_GLANCE_FORCE_FILL_WHILE_CHARGING, enabled).apply()

fun isAmbientMusicGlanceForceFillWhileChargingEnabled(): Boolean = prefs.getBoolean(KEY_AMBIENT_MUSIC_GLANCE_FORCE_FILL_WHILE_CHARGING, false)
fun setAmbientMusicGlanceForceFillWhileChargingEnabled(enabled: Boolean) = prefs.edit().putBoolean(KEY_AMBIENT_MUSIC_GLANCE_FORCE_FILL_WHILE_CHARGING, enabled).apply()
fun isAmbientMusicGlanceRespectNotificationsEnabled(): Boolean =
prefs.getBoolean(KEY_AMBIENT_MUSIC_GLANCE_RESPECT_NOTIFICATIONS, true)

fun isAmbientMusicGlanceRespectNotificationsEnabled(): Boolean = prefs.getBoolean(KEY_AMBIENT_MUSIC_GLANCE_RESPECT_NOTIFICATIONS, true)
fun setAmbientMusicGlanceRespectNotificationsEnabled(enabled: Boolean) = prefs.edit().putBoolean(KEY_AMBIENT_MUSIC_GLANCE_RESPECT_NOTIFICATIONS, enabled).apply()
fun setAmbientMusicGlanceRespectNotificationsEnabled(enabled: Boolean) =
prefs.edit().putBoolean(KEY_AMBIENT_MUSIC_GLANCE_RESPECT_NOTIFICATIONS, enabled).apply()

// Notification Glance Settings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ sealed interface Action {
enum class SoundModeType {
@SerializedName("SOUND")
SOUND,

@SerializedName("VIBRATE")
VIBRATE,

@SerializedName("SILENT")
SILENT
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ data class Automation(
enum class Type {
@SerializedName("TRIGGER")
TRIGGER,

@SerializedName("STATE")
STATE,

@SerializedName("APP")
APP
}
Expand Down
Loading