Skip to content

Commit

Permalink
clear code
Browse files Browse the repository at this point in the history
  • Loading branch information
kernel0x committed Sep 17, 2019
1 parent def563f commit 8110a43
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ class TransactionActivity : BaseFinchActivity() {
override fun onOptionsItemSelected(item: MenuItem): Boolean {
return when (item.itemId) {
R.id.share_text -> {
share(FormatUtil.getShareText(this, transactionHttp!!))
transactionHttp?.apply {
share(FormatUtil.getShareText(this@TransactionActivity, this))
}
true
}
R.id.share_file -> {
Expand All @@ -78,7 +80,9 @@ class TransactionActivity : BaseFinchActivity() {
true
}
R.id.share_curl -> {
share(FormatUtil.getShareCurlCommand(transactionHttp!!))
transactionHttp?.apply {
share(FormatUtil.getShareCurlCommand(this))
}
true
}
else -> super.onOptionsItemSelected(item)
Expand Down

0 comments on commit 8110a43

Please sign in to comment.