Skip to content

Commit

Permalink
Updated splashscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
fast4x committed Oct 19, 2023
1 parent 9d21fd1 commit f15bfd8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion app/src/main/kotlin/it/vfsfitvnm/vimusic/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import android.content.ServiceConnection
import android.content.SharedPreferences
import android.graphics.Bitmap
import android.os.Bundle
import android.os.Handler
import android.os.IBinder
import android.os.Looper
import android.util.Log
import android.widget.Toast
import androidx.activity.ComponentActivity
Expand Down Expand Up @@ -141,7 +143,12 @@ class MainActivity : ComponentActivity(), PersistMapOwner {
@OptIn(ExperimentalFoundationApi::class, ExperimentalAnimationApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val splashScreen = installSplashScreen()

var splashScreenStays = true
val delayTime = 800L

installSplashScreen().setKeepOnScreenCondition { splashScreenStays }
Handler(Looper.getMainLooper()).postDelayed({ splashScreenStays = false }, delayTime)

@Suppress("DEPRECATION", "UNCHECKED_CAST")
persistMap = lastCustomNonConfigurationInstance as? PersistMap ?: PersistMap()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ fun MediaItemMenu(
}
)
}

/*
onDownload?.let { onDownload ->
MenuEntry(
icon = R.drawable.download,
Expand All @@ -514,7 +514,7 @@ fun MediaItemMenu(
}
)
}

*/
onGoToEqualizer?.let { onGoToEqualizer ->
MenuEntry(
icon = R.drawable.equalizer,
Expand Down

0 comments on commit f15bfd8

Please sign in to comment.