mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Avoid redundant info in history
git-svn-id: https://zxing.googlecode.com/svn/trunk@2688 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
7c6ac647e3
commit
82e05d1c51
|
@ -204,10 +204,19 @@ public final class HistoryManager {
|
|||
}
|
||||
|
||||
if (oldID != null) {
|
||||
String newDetails = oldDetails == null ? itemDetails : oldDetails + " : " + itemDetails;
|
||||
ContentValues values = new ContentValues();
|
||||
values.put(DBHelper.DETAILS_COL, newDetails);
|
||||
db.update(DBHelper.TABLE_NAME, values, DBHelper.ID_COL + "=?", new String[] { oldID });
|
||||
String newDetails;
|
||||
if (oldDetails == null) {
|
||||
newDetails = itemDetails;
|
||||
} else if (oldDetails.contains(itemDetails)) {
|
||||
newDetails = null;
|
||||
} else {
|
||||
newDetails = oldDetails + " : " + itemDetails;
|
||||
}
|
||||
if (newDetails != null) {
|
||||
ContentValues values = new ContentValues();
|
||||
values.put(DBHelper.DETAILS_COL, newDetails);
|
||||
db.update(DBHelper.TABLE_NAME, values, DBHelper.ID_COL + "=?", new String[] { oldID });
|
||||
}
|
||||
}
|
||||
|
||||
} finally {
|
||||
|
|
|
@ -108,7 +108,7 @@ public abstract class SupplementalInfoRetriever extends AsyncTask<Object,Object,
|
|||
StringBuilder newTextCombined = new StringBuilder();
|
||||
|
||||
if (source != null) {
|
||||
newTextCombined.append(source).append(" : ");
|
||||
newTextCombined.append(source).append(' ');
|
||||
}
|
||||
|
||||
int linkStart = newTextCombined.length();
|
||||
|
|
Loading…
Reference in a new issue