pull/32/head
gedoor 6 years ago
parent 205b7170f3
commit ec49c73e81
  1. 9
      app/src/main/java/io/legado/app/App.kt

@ -41,13 +41,9 @@ class App : Application() {
} catch (e: PackageManager.NameNotFoundException) {
0
}
if (!ThemeStore.isConfigured(this, versionCode)) upThemeStore()
initNightTheme()
if (!ThemeStore.isConfigured(this, versionCode)) {
upThemeStore()
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
createChannelId()
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) createChannelId()
}
fun initNightTheme() {
@ -85,7 +81,6 @@ class App : Application() {
/**
* 创建通知ID
*/
@RequiresApi(Build.VERSION_CODES.O)
private fun createChannelId() {
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager

Loading…
Cancel
Save