public boolean shouldShowAds() { if (!loggedUser.isLoggedIn()) { return true; } User current = loggedUser.getCurrent(); if (current.getKarma() <= 50) { return true; } if (current.getKarma() <= 1000) { return shouldShowWithPercentage(50); } return shouldShowWithPercentage(25); }
@Override public boolean shouldHandle(Flaggable flaggable) { boolean isQuestion = Answer.class.isAssignableFrom(flaggable.getClass()); return isQuestion && loggedUser.isLoggedIn() && loggedUser.isModerator(); }