MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / keyClear

Method keyClear

src/main/java/Client/Roster.java:2162–2199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2160 }
2161
2162 public void keyClear() {
2163 if (isLoggedIn()) {
2164 final Contact c = (Contact) getFocusedObject();
2165 try {
2166 boolean isContact = (getFocusedObject() instanceof Contact);
2167//#ifndef WMUC
2168 boolean isMucContact = (getFocusedObject() instanceof MucContact);
2169//#else
2170//# boolean isMucContact=false;
2171//#endif
2172 if (isContact && !isMucContact) {
2173 new AlertBox(SR.MS_DELETE_ASK, c.getNickJid()) {
2174
2175 public void yes() {
2176 deleteContact(c);
2177 }
2178
2179 public void no() {
2180 }
2181 };
2182 }
2183//#ifndef WMUC
2184 else if (isContact && isMucContact && c.origin != Contact.ORIGIN_GROUPCHAT) {
2185 ConferenceGroup mucGrp = (ConferenceGroup) c.group;
2186 if (mucGrp.selfContact.roleCode == MucContact.ROLE_MODERATOR) {
2187 if (((MucContact) c).roleCode < MucContact.ROLE_MODERATOR) {
2188 String myNick = mucGrp.selfContact.getName();
2189 MucContact mc = (MucContact) c;
2190 new ConferenceQuickPrivelegeModify(mc, ConferenceQuickPrivelegeModify.KICK, myNick);
2191 }
2192 }
2193 }
2194//#endif
2195 } catch (Exception e) { /*
2196 * NullPointerException
2197 */ }
2198 }
2199 }
2200
2201 public void toggleOfflines() {
2202 cf.showOfflineContacts = !cf.showOfflineContacts;

Callers

nothing calls this directly

Calls 4

isLoggedInMethod · 0.95
getNickJidMethod · 0.95
getFocusedObjectMethod · 0.80
getNameMethod · 0.65

Tested by

no test coverage detected