mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-30 22:07:57 +01:00 
			
		
		
		
	Set manga last update field based on chapter fetch time (closes #2217)
Based on3c81f60041 (diff-7e5179d048c3dfaf75b444b7277fc840)(cherry picked from commitee8a53188c)
This commit is contained in:
		| @@ -150,8 +150,9 @@ fun syncChaptersWithSource( | ||||
|         // Fix order in source. | ||||
|         db.fixChaptersSourceOrder(sourceChapters).executeAsBlocking() | ||||
|  | ||||
|         // Set this manga as updated since chapters were changed | ||||
|         manga.last_update = Date().time | ||||
|         // Set manga's last update time to latest chapter's fetch time if possible | ||||
|         val newestChapter = db.getChapters(manga).executeAsBlocking().maxBy { it.date_fetch } | ||||
|         manga.last_update = newestChapter?.date_fetch ?: manga.last_update | ||||
|         db.updateLastUpdated(manga).executeAsBlocking() | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user