aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-10-13 22:32:53 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-10-13 22:47:06 +0900
commitf3003892c64ed6c40ed8fda5b1cf29f094e60c72 (patch)
treebefe539e9254880b5f886e5dbc43ad673d158dae /app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt
parentbc28c73d206716923725ab24052e1b3b967d7f24 (diff)
downloadSmileEssence-f3003892c64ed6c40ed8fda5b1cf29f094e60c72.tar.gz
get rid of orma that adds 1MB
Diffstat (limited to 'app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt')
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt
index 139c4f58..56270f7a 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt
@@ -87,7 +87,7 @@ class StatusDetailDialogFragment : StackableDialogFragment() {
view.image_status_detail_fav_count.visibility = View.GONE
view.textview_status_detail_fav_count.visibility = View.GONE
}
- view.button_status_detail_favorite.setState(tweet.isFavoritedBy(world.account.userId))
+ view.button_status_detail_favorite.setState(tweet.isFavoritedBy(world.account.id))
if (tweet.retweetCount > 0) {
view.textview_status_detail_rt_count.text = Integer.toString(tweet.retweetCount)
@@ -97,7 +97,7 @@ class StatusDetailDialogFragment : StackableDialogFragment() {
view.image_status_detail_rt_count.visibility = View.GONE
view.textview_status_detail_rt_count.visibility = View.GONE
}
- view.button_status_detail_retweet.setState(tweet.isRetweetedBy(world.account.userId))
+ view.button_status_detail_retweet.setState(tweet.isRetweetedBy(world.account.id))
}
private fun updateViewButtons(view: View) {
@@ -124,10 +124,10 @@ class StatusDetailDialogFragment : StackableDialogFragment() {
view.button_status_detail_retweet.setOnClickListener {
val account = world.account
confirm({
- if (tweet.isRetweetedBy(account.userId)) {
+ if (tweet.isRetweetedBy(account.id)) {
launchUi {
try {
- world.deleteTweetAsync(tweet.getRetweetIdBy(account.userId)).await()
+ world.deleteTweetAsync(tweet.getRetweetIdBy(account.id)).await()
world.notify(R.string.notice_status_delete_succeeded)
updateViewButtons(view)
} catch (e: TwitterTaskException) {
@@ -137,7 +137,7 @@ class StatusDetailDialogFragment : StackableDialogFragment() {
} else {
launchUi {
try {
- world.retweetAsync(tweet.getRetweetIdBy(account.userId)).await()
+ world.retweetAsync(tweet.getRetweetIdBy(account.id)).await()
world.notify(R.string.notice_retweet_succeeded)
updateViewButtons(view)
} catch (e: TwitterTaskException) {
@@ -149,7 +149,7 @@ class StatusDetailDialogFragment : StackableDialogFragment() {
}
view.button_status_detail_favorite.setOnClickListener {
val account = world.account
- val favoriting = !tweet.isFavoritedBy(account.userId)
+ val favoriting = !tweet.isFavoritedBy(account.id)
launchUi {
try {