use of com.ichi2.libanki.backend.model.TagUsnTuple in project Anki-Android by ankidroid.
the class Syncer method getTags.
/**
* Tags ********************************************************************
*/
private JSONArray getTags() {
JSONArray result = new JSONArray();
if (mCol.getServer()) {
for (TagUsnTuple t : mCol.getTags().allItems()) {
if (t.getUsn() >= mMinUsn) {
result.put(t.getTag());
}
}
} else {
for (TagUsnTuple t : mCol.getTags().allItems()) {
if (t.getUsn() == -1) {
String tag = t.getTag();
mCol.getTags().add(t.getTag(), mMaxUsn);
result.put(tag);
}
}
mCol.getTags().save();
}
return result;
}
Aggregations