mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Fix auto-updater job never running
This commit is contained in:
		@@ -78,7 +78,7 @@ class EHentaiUpdateWorker: JobService(), CoroutineScope {
 | 
			
		||||
     * to end the job entirely.  Regardless of the value returned, your job must stop executing.
 | 
			
		||||
     */
 | 
			
		||||
    override fun onStopJob(params: JobParameters?): Boolean {
 | 
			
		||||
        runBlocking { coroutineContext[Job]?.cancelAndJoin() }
 | 
			
		||||
        runBlocking { this@EHentaiUpdateWorker.coroutineContext[Job]?.cancelAndJoin() }
 | 
			
		||||
        return false
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -299,7 +299,7 @@ class EHentaiUpdateWorker: JobService(), CoroutineScope {
 | 
			
		||||
                    .setRequiredNetworkType(
 | 
			
		||||
                            if(requireUnmetered) JobInfo.NETWORK_TYPE_UNMETERED
 | 
			
		||||
                            else JobInfo.NETWORK_TYPE_ANY)
 | 
			
		||||
                    .setRequiresDeviceIdle(true)
 | 
			
		||||
//                    .setRequiresDeviceIdle(true) Job never seems to run with this
 | 
			
		||||
                    .build()
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user