forked from I2P_Developers/i2p.i2p
fixups after review
This commit is contained in:
@ -1524,7 +1524,9 @@ class PeerCoordinator implements PeerListener
|
||||
* @since 0.9.31
|
||||
*/
|
||||
public void gotCommentReq(Peer peer, int num) {
|
||||
/* if disabled, return */
|
||||
/* TODO cache per-torrent setting, use it instead */
|
||||
if (!_util.utCommentsEnabled())
|
||||
return;
|
||||
CommentSet comments = snark.getComments();
|
||||
if (comments != null) {
|
||||
int lastSent = peer.getTotalCommentsSent();
|
||||
@ -1547,7 +1549,9 @@ class PeerCoordinator implements PeerListener
|
||||
* @since 0.9.31
|
||||
*/
|
||||
public void gotComments(Peer peer, List<Comment> comments) {
|
||||
/* if disabled, return */
|
||||
/* TODO cache per-torrent setting, use it instead */
|
||||
if (!_util.utCommentsEnabled())
|
||||
return;
|
||||
if (!comments.isEmpty())
|
||||
snark.addComments(comments);
|
||||
}
|
||||
|
@ -797,6 +797,9 @@ public class SnarkManager implements CompleteListener, ClientApp {
|
||||
updateConfig();
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 0.9.31
|
||||
*/
|
||||
public boolean getUniversalTheming() {
|
||||
return _context.getBooleanProperty(RC_PROP_UNIVERSAL_THEMING);
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public class Comment implements Comparable<Comment> {
|
||||
name = name.substring(0, MAX_NAME_LEN);
|
||||
}
|
||||
this.name = name;
|
||||
if (rating < 0 || rating > 5)
|
||||
if (rating < 0)
|
||||
rating = 0;
|
||||
else if (rating > 5)
|
||||
rating = 5;
|
||||
|
Reference in New Issue
Block a user