This commit is contained in:
AriaLyy
2017-07-31 10:52:01 +08:00
parent 44ca80044d
commit f4e2202033
2 changed files with 9 additions and 1 deletions

View File

@ -81,7 +81,11 @@ public abstract class AbsTarget<TARGET extends AbsTarget, ENTITY extends AbsEnti
* @param str 扩展数据
*/
public TARGET setExtendField(String str) {
mEntity.setStr(str);
if (TextUtils.isEmpty(str)) return (TARGET) this;
if (TextUtils.isEmpty(mEntity.getStr()) || !mEntity.getStr().equals(str)) {
mEntity.setStr(str);
mEntity.save();
}
return (TARGET) this;
}