|
|
|
|
@ -272,11 +272,15 @@ public final class ActFmSyncService {
|
|
|
|
|
}
|
|
|
|
|
if (tagOrderQueue.size() > 0) {
|
|
|
|
|
AndroidUtilities.sleepDeep(WAIT_BEFORE_PUSH_ORDER);
|
|
|
|
|
try {
|
|
|
|
|
Long tagDataId = tagOrderQueue.remove(0);
|
|
|
|
|
TagData td = tagDataService.fetchById(tagDataId, TagData.ID, TagData.REMOTE_ID, TagData.TAG_ORDERING);
|
|
|
|
|
if (td != null) {
|
|
|
|
|
pushTagOrdering(td);
|
|
|
|
|
}
|
|
|
|
|
} catch (IndexOutOfBoundsException e) {
|
|
|
|
|
// In case element was removed
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -593,6 +597,13 @@ public final class ActFmSyncService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void pushTagOrderingImmediately(TagData tagData) {
|
|
|
|
|
if (tagOrderQueue.contains(tagData.getId())) {
|
|
|
|
|
tagOrderQueue.remove(tagData.getId());
|
|
|
|
|
pushTagOrdering(tagData);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void pushTagOrdering(TagData tagData) {
|
|
|
|
|
if (!checkForToken())
|
|
|
|
|
return;
|
|
|
|
|
|