use of org.geometerplus.fbreader.network.INetworkLink in project FBReaderJ by geometer.
the class TopupAction method getContextLabel.
@Override
public String getContextLabel(NetworkTree tree) {
final INetworkLink link = tree.getLink();
Money account = null;
if (link != null) {
final NetworkAuthenticationManager mgr = link.authenticationManager();
if (mgr != null && mgr.mayBeAuthorised(false)) {
account = mgr.currentAccount();
}
}
return super.getContextLabel(tree).replace("%s", account != null ? account.toString() : "");
}
Aggregations