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

Loading…
Cancel
Save