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

Method isHasUrl

src/main/java/Messages/MessageList.java:167–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

165 }
166
167 public boolean isHasUrl() {
168 if (getItemCount() < 1) {
169 return false;
170 }
171 String body = ((MessageItem) getFocusedObject()).msg.body;
172 if (body.indexOf("http://") > -1) {
173 return true;
174 }
175 if (body.indexOf("https://") > -1) {
176 return true;
177 }
178 if (body.indexOf("ftp://") > -1) {
179 return true;
180 }
181 if (body.indexOf("tel:") > -1) {
182 return true;
183 }
184 if (body.indexOf("native:") > -1) {
185 return true;
186 }
187 return false;
188 }
189
190 private void toogleSmiles() {
191 Object o = getFocusedObject();

Callers 1

commandStateMethod · 0.95

Calls 2

getItemCountMethod · 0.95
getFocusedObjectMethod · 0.80

Tested by

no test coverage detected