|  |  |  | @ -23,18 +23,49 @@ import androidx.viewbinding.ViewBinding | 
			
		
	
		
			
				
					|  |  |  |  | import me.fycz.maple.MapleBridge | 
			
		
	
		
			
				
					|  |  |  |  | import me.fycz.maple.MapleUtils | 
			
		
	
		
			
				
					|  |  |  |  | import me.fycz.maple.MethodReplacement | 
			
		
	
		
			
				
					|  |  |  |  | import xyz.fycz.myreader.greendao.DbManager | 
			
		
	
		
			
				
					|  |  |  |  | import xyz.fycz.myreader.greendao.entity.Chapter | 
			
		
	
		
			
				
					|  |  |  |  | import xyz.fycz.myreader.greendao.gen.ChapterDao | 
			
		
	
		
			
				
					|  |  |  |  | import xyz.fycz.myreader.greendao.service.ChapterService | 
			
		
	
		
			
				
					|  |  |  |  | import xyz.fycz.myreader.ui.activity.BookDetailedActivity | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | /** | 
			
		
	
		
			
				
					|  |  |  |  |  * @author fengyue | 
			
		
	
		
			
				
					|  |  |  |  |  * @date 2022/8/11 16:44 | 
			
		
	
		
			
				
					|  |  |  |  |  */ | 
			
		
	
		
			
				
					|  |  |  |  | @AppFix([243, 244, 245, 246, 250], ["[书籍详情界面]取消书籍简介展开时最大行数限制(无法显示完全)"], "2022-08-11") | 
			
		
	
		
			
				
					|  |  |  |  | @AppFix( | 
			
		
	
		
			
				
					|  |  |  |  |     [243, 244, 245, 246, 250], | 
			
		
	
		
			
				
					|  |  |  |  |     ["[书籍详情界面]取消书籍简介展开时最大行数限制(无法显示完全)", | 
			
		
	
		
			
				
					|  |  |  |  |         "修复从数据库中读取章节时部分数据项缺失的bug"], | 
			
		
	
		
			
				
					|  |  |  |  |     "2022-08-11" | 
			
		
	
		
			
				
					|  |  |  |  | ) | 
			
		
	
		
			
				
					|  |  |  |  | class App250Fix : AppFixHandle { | 
			
		
	
		
			
				
					|  |  |  |  |     override fun onFix(key: String): BooleanArray { | 
			
		
	
		
			
				
					|  |  |  |  |         return handleFix( | 
			
		
	
		
			
				
					|  |  |  |  |             key, | 
			
		
	
		
			
				
					|  |  |  |  |             "showMoreDesc" to { fxShowMoreDesc() }, | 
			
		
	
		
			
				
					|  |  |  |  |             "findBookAllChapterByBookId" to { fxFindBookAllChapterByBookId() }, | 
			
		
	
		
			
				
					|  |  |  |  |         ) | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     private fun fxFindBookAllChapterByBookId() { | 
			
		
	
		
			
				
					|  |  |  |  |         MapleUtils.findAndHookMethod( | 
			
		
	
		
			
				
					|  |  |  |  |             ChapterService::class.java, | 
			
		
	
		
			
				
					|  |  |  |  |             "findBookAllChapterByBookId", | 
			
		
	
		
			
				
					|  |  |  |  |             String::class.java, | 
			
		
	
		
			
				
					|  |  |  |  |             object : MethodReplacement() { | 
			
		
	
		
			
				
					|  |  |  |  |                 override fun replaceHookedMethod(param: MapleBridge.MethodHookParam): Any { | 
			
		
	
		
			
				
					|  |  |  |  |                     val bookId = param.args[0] as String? | 
			
		
	
		
			
				
					|  |  |  |  |                     if (bookId.isNullOrBlank()) { | 
			
		
	
		
			
				
					|  |  |  |  |                         return emptyList<Chapter>() | 
			
		
	
		
			
				
					|  |  |  |  |                     } | 
			
		
	
		
			
				
					|  |  |  |  |                     return DbManager.getDaoSession().chapterDao | 
			
		
	
		
			
				
					|  |  |  |  |                         .queryBuilder() | 
			
		
	
		
			
				
					|  |  |  |  |                         .where(ChapterDao.Properties.BookId.eq(bookId)) | 
			
		
	
		
			
				
					|  |  |  |  |                         .orderAsc(ChapterDao.Properties.Number) | 
			
		
	
		
			
				
					|  |  |  |  |                         .list() | 
			
		
	
		
			
				
					|  |  |  |  |                 } | 
			
		
	
		
			
				
					|  |  |  |  |             } | 
			
		
	
		
			
				
					|  |  |  |  |         ) | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | 
 |