pull/1705/head
			
			
		
		
							parent
							
								
									da61e62220
								
							
						
					
					
						commit
						71a37a4057
					
				@ -1,23 +1,9 @@ | 
				
			|||||||
package io.legado.app.model.analyzeRule | 
					package io.legado.app.model.analyzeRule | 
				
			||||||
 | 
					
 | 
				
			||||||
import io.legado.app.constant.AppLog | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class RuleData : RuleDataInterface { | 
					class RuleData : RuleDataInterface { | 
				
			||||||
 | 
					
 | 
				
			||||||
    override val variableMap by lazy { | 
					    override val variableMap by lazy { | 
				
			||||||
        hashMapOf<String, String>() | 
					        hashMapOf<String, String>() | 
				
			||||||
    } | 
					    } | 
				
			||||||
 | 
					
 | 
				
			||||||
    override fun putVariable(key: String, value: String?) { | 
					 | 
				
			||||||
        if (value != null) { | 
					 | 
				
			||||||
            if (value.length > 1000) { | 
					 | 
				
			||||||
                AppLog.put("设置变量长度超过1000,设置失败") | 
					 | 
				
			||||||
                return | 
					 | 
				
			||||||
            } | 
					 | 
				
			||||||
            variableMap[key] = value | 
					 | 
				
			||||||
        } else { | 
					 | 
				
			||||||
            variableMap.remove(key) | 
					 | 
				
			||||||
        } | 
					 | 
				
			||||||
    } | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
} | 
					} | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue