Skip to content

Commit

Permalink
[TIMOB-18608] Fixed spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
pec1985 committed Feb 24, 2015
1 parent 27a4444 commit 466c856
Showing 1 changed file with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,21 @@ public boolean onTouchEvent(MotionEvent event) {
ClickableSpan[] link = buffer.getSpans(off, off,
ClickableSpan.class);

if (link.length != 0) {
ClickableSpan cSpan = link[0];
if (action == MotionEvent.ACTION_UP) {
TiViewProxy proxy = getProxy();
if(proxy.hasListeners("link")) {
KrollDict evnt = new KrollDict();
if(cSpan instanceof URLSpan) {
evnt.put("url", ((URLSpan)cSpan).getURL());
}
proxy.fireEvent("link", evnt, false);
} else {
cSpan.onClick(textView);
}
} else if (action == MotionEvent.ACTION_DOWN) {
Selection.setSelection(buffer, buffer.getSpanStart(cSpan), buffer.getSpanEnd(cSpan));
}
}
if (link.length != 0) {
ClickableSpan cSpan = link[0];
if (action == MotionEvent.ACTION_UP) {
TiViewProxy proxy = getProxy();
if(proxy.hasListeners("link") && (cSpan instanceof URLSpan)) {
KrollDict evnt = new KrollDict();
evnt.put("url", ((URLSpan)cSpan).getURL());
proxy.fireEvent("link", evnt, false);
} else {
cSpan.onClick(textView);
}
} else if (action == MotionEvent.ACTION_DOWN) {
Selection.setSelection(buffer, buffer.getSpanStart(cSpan), buffer.getSpanEnd(cSpan));
}
}
}

}
Expand Down

0 comments on commit 466c856

Please sign in to comment.