mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-06 12:00:17 +02:00
"duplicate" tags problem in BookStatusActivity has been fixed
This commit is contained in:
parent
cdd522a495
commit
ff8ca5d1f6
1 changed files with 9 additions and 4 deletions
|
@ -22,6 +22,7 @@ package org.geometerplus.android.fbreader;
|
|||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Intent;
|
||||
|
@ -206,11 +207,15 @@ public class BookStatusActivity extends Activity {
|
|||
(series == null || series.Index <= 0) ? null : String.valueOf(series.Index));
|
||||
|
||||
buffer.delete(0, buffer.length());
|
||||
final HashSet<String> tagNames = new HashSet<String>();
|
||||
for (Tag tag : book.tags()) {
|
||||
if (!tagNames.contains(tag.Name)) {
|
||||
if (buffer.length() > 0) {
|
||||
buffer.append(", ");
|
||||
}
|
||||
buffer.append(tag.Name);
|
||||
tagNames.add(tag.Name);
|
||||
}
|
||||
}
|
||||
setupInfoPair(R.id.book_tags, "tags", buffer);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue