mirror of
https://github.com/gotson/komga.git
synced 2025-12-24 01:14:03 +01:00
fix(komga-tray): some tasks would not be run on startup
This commit is contained in:
parent
f2f25088be
commit
a47eddbbac
2 changed files with 8 additions and 1 deletions
|
|
@ -1,12 +1,16 @@
|
|||
package org.gotson.komga
|
||||
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder
|
||||
import org.springframework.scheduling.annotation.EnableAsync
|
||||
|
||||
@EnableAsync
|
||||
class DesktopApplication : Application()
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
System.setProperty("apple.awt.UIElement", "true")
|
||||
System.setProperty("org.jooq.no-logo", "true")
|
||||
System.setProperty("org.jooq.no-tips", "true")
|
||||
val builder = SpringApplicationBuilder(Application::class.java)
|
||||
val builder = SpringApplicationBuilder(DesktopApplication::class.java)
|
||||
builder.headless(false)
|
||||
builder.run(*args)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import org.springframework.boot.ApplicationRunner
|
|||
import org.springframework.context.annotation.Profile
|
||||
import org.springframework.core.env.Environment
|
||||
import org.springframework.core.io.ClassPathResource
|
||||
import org.springframework.scheduling.annotation.Async
|
||||
import org.springframework.stereotype.Component
|
||||
import java.io.File
|
||||
|
||||
|
|
@ -29,6 +30,8 @@ class TrayIconRunner(
|
|||
val komgaConfigDir = File(komgaConfigDir)
|
||||
val logFile = File(logFileName)
|
||||
val iconFileName = if (env.activeProfiles.contains("mac")) "komga-gray-minimal.svg" else "komga-color.svg"
|
||||
|
||||
@Async
|
||||
override fun run(args: ApplicationArguments) {
|
||||
runTray()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue