mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Automatic Lint
This commit is contained in:
@@ -21,13 +21,12 @@ class ReaderActivity : AppCompatActivity() {
|
||||
context: Context,
|
||||
mangaId: Long,
|
||||
chapterIndex: Int,
|
||||
): Intent {
|
||||
return Intent(context, ReaderActivity::class.java).apply {
|
||||
): Intent =
|
||||
Intent(context, ReaderActivity::class.java).apply {
|
||||
putExtra("manga", mangaId)
|
||||
putExtra("chapter", chapterIndex)
|
||||
addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
||||
@@ -74,9 +74,7 @@ class AndroidDownloadService : Service() {
|
||||
context.stopService(Intent(context, AndroidDownloadService::class.java))
|
||||
}
|
||||
|
||||
fun isRunning(): Boolean {
|
||||
return instance != null
|
||||
}
|
||||
fun isRunning(): Boolean = instance != null
|
||||
|
||||
private val json = Json {
|
||||
ignoreUnknownKeys = true
|
||||
@@ -87,9 +85,7 @@ class AndroidDownloadService : Service() {
|
||||
|
||||
private lateinit var ioScope: CoroutineScope
|
||||
|
||||
override fun onBind(intent: Intent): IBinder? {
|
||||
return null
|
||||
}
|
||||
override fun onBind(intent: Intent): IBinder? = null
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
@@ -123,7 +119,9 @@ class AndroidDownloadService : Service() {
|
||||
Actions.START.name,
|
||||
Actions.RESTART.name,
|
||||
-> startWebsocket()
|
||||
|
||||
Actions.STOP.name -> stopSelf()
|
||||
|
||||
else -> log.info { "This should never happen. No action in the received intent" }
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -73,9 +73,7 @@ class AndroidLibraryService : Service() {
|
||||
context.stopService(Intent(context, AndroidLibraryService::class.java))
|
||||
}
|
||||
|
||||
fun isRunning(): Boolean {
|
||||
return instance != null
|
||||
}
|
||||
fun isRunning(): Boolean = instance != null
|
||||
|
||||
private val json = Json {
|
||||
ignoreUnknownKeys = true
|
||||
@@ -86,9 +84,7 @@ class AndroidLibraryService : Service() {
|
||||
|
||||
private lateinit var ioScope: CoroutineScope
|
||||
|
||||
override fun onBind(intent: Intent): IBinder? {
|
||||
return null
|
||||
}
|
||||
override fun onBind(intent: Intent): IBinder? = null
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
@@ -122,7 +118,9 @@ class AndroidLibraryService : Service() {
|
||||
Actions.START.name,
|
||||
Actions.RESTART.name,
|
||||
-> startWebsocket()
|
||||
|
||||
Actions.STOP.name -> stopSelf()
|
||||
|
||||
else -> log.info { "This should never happen. No action in the received intent" }
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user