mirror of
https://github.com/tateisu/SubwayTooter
synced 2024-12-25 00:21:26 +01:00
クラッシュレポート対応
This commit is contained in:
parent
150381be7a
commit
7436c82819
@ -138,7 +138,7 @@ internal class PopupAutoCompleteAcct(
|
||||
if(acct[0] == ' ') {
|
||||
// 絵文字ショートコード
|
||||
if(! EmojiDecoder.canStartShortCode(sb, start)) sb.append(' ')
|
||||
sb.append( findShortCode(acct.toString()))
|
||||
sb.append(findShortCode(acct.toString()))
|
||||
} else {
|
||||
// @user@host, #hashtag
|
||||
// 直後に空白を付与する
|
||||
@ -162,8 +162,6 @@ internal class PopupAutoCompleteAcct(
|
||||
updatePosition()
|
||||
}
|
||||
|
||||
|
||||
|
||||
private fun findShortCode(acct : String) : String {
|
||||
val m = reLastShortCode.matcher(acct)
|
||||
if(m.find()) return m.group(0)
|
||||
@ -195,9 +193,14 @@ internal class PopupAutoCompleteAcct(
|
||||
|
||||
val layout = etContent.layout
|
||||
|
||||
popup_top = (text_top
|
||||
+ etContent.totalPaddingTop
|
||||
+ layout.getLineBottom(layout.lineCount - 1)) - etContent.scrollY
|
||||
popup_top = try {
|
||||
(text_top
|
||||
+ etContent.totalPaddingTop
|
||||
+ layout.getLineBottom(layout.lineCount - 1)) - etContent.scrollY
|
||||
} catch(ex : Throwable) {
|
||||
// java.lang.IllegalStateException
|
||||
0
|
||||
}
|
||||
|
||||
if(popup_top < form_top) popup_top = form_top
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user