mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Removed unused variables.
This commit is contained in:
@@ -1408,22 +1408,17 @@ DatabaseCleaner.Callback {
|
|||||||
*/
|
*/
|
||||||
private void updateAuthorSendability(T txn, AuthorId a, boolean increment)
|
private void updateAuthorSendability(T txn, AuthorId a, boolean increment)
|
||||||
throws DbException {
|
throws DbException {
|
||||||
int direct = 0, indirect = 0;
|
|
||||||
for(MessageId id : db.getMessagesByAuthor(txn, a)) {
|
for(MessageId id : db.getMessagesByAuthor(txn, a)) {
|
||||||
int sendability = db.getSendability(txn, id);
|
int sendability = db.getSendability(txn, id);
|
||||||
if(increment) {
|
if(increment) {
|
||||||
db.setSendability(txn, id, sendability + 1);
|
db.setSendability(txn, id, sendability + 1);
|
||||||
if(sendability == 0) {
|
if(sendability == 0)
|
||||||
direct++;
|
updateAncestorSendability(txn, id, true);
|
||||||
indirect += updateAncestorSendability(txn, id, true);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
assert sendability > 0;
|
assert sendability > 0;
|
||||||
db.setSendability(txn, id, sendability - 1);
|
db.setSendability(txn, id, sendability - 1);
|
||||||
if(sendability == 1) {
|
if(sendability == 1)
|
||||||
direct++;
|
updateAncestorSendability(txn, id, false);
|
||||||
indirect += updateAncestorSendability(txn, id, false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user