There was an error while loading. Please reload this page.
1 parent 6b6f517 commit e3ad7f5Copy full SHA for e3ad7f5
1 file changed
app/src/main/java/com/immichframe/immichframe/MainActivity.kt
@@ -819,13 +819,13 @@ class MainActivity : AppCompatActivity() {
819
val startMinutes = startHour * 60 + startMinute
820
val endMinutes = endHour * 60 + endMinute
821
822
- val shouldDim = if (startMinutes < endMinutes) {
823
- // Same day
824
- nowMinutes in startMinutes until endMinutes
825
- } else {
826
- // Spans midnight
827
- nowMinutes >= startMinutes || nowMinutes < endMinutes
828
- }
+ val shouldDim =
+ if (startMinutes < endMinutes) {
+ nowMinutes in startMinutes until endMinutes
+ } else {
+ nowMinutes !in endMinutes until startMinutes
+ }
+
829
val isOverlayVisible = dimOverlay.isVisible
830
if (shouldDim && !isOverlayVisible) {
831
screenDim(true)
0 commit comments