diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2017-10-07 16:34:25 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2017-10-07 16:34:25 +0900 |
commit | e887576299541f851a64b03c994fc833f65921a8 (patch) | |
tree | 55c9785b8381f62a32b3e6b8ab25750959ee9231 /app/src/main/java/net/lacolaco/smileessence/view/dialog | |
parent | 49274234f89edda9080275a4677f01db10385152 (diff) | |
download | SmileEssence-e887576299541f851a64b03c994fc833f65921a8.tar.gz |
anko intents
Diffstat (limited to 'app/src/main/java/net/lacolaco/smileessence/view/dialog')
-rw-r--r-- | app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt | 4 | ||||
-rw-r--r-- | app/src/main/java/net/lacolaco/smileessence/view/dialog/UserDetailDialogFragment.kt | 14 |
2 files changed, 9 insertions, 9 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 91f5cbf6..4517eae5 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 @@ -43,13 +43,13 @@ import net.lacolaco.smileessence.entity.Tweet import net.lacolaco.smileessence.preference.UserPreferenceHelper import net.lacolaco.smileessence.twitter.task.TweetReactions import net.lacolaco.smileessence.twitter.task.Tweets -import net.lacolaco.smileessence.util.IntentUtils import net.lacolaco.smileessence.util.SystemServiceHelper import net.lacolaco.smileessence.util.UIObserverBundle import net.lacolaco.smileessence.view.DialogHelper import net.lacolaco.smileessence.view.Partials import net.lacolaco.smileessence.view.adapter.CustomListAdapter import net.lacolaco.smileessence.view.adapter.TimelineAdapter +import org.jetbrains.anko.browse import java.lang.ref.WeakReference import java.util.ArrayList @@ -133,7 +133,7 @@ class StatusDetailDialogFragment : StackableDialogFragment(), View.OnClickListen 1 -> { DialogHelper.showDialog(activity, TalkChainDialogFragment.newInstance(tweet)) } - 2 -> IntentUtils.openUri(activity, tweet.originalTweet.twitterUrl) + 2 -> browse(tweet.originalTweet.twitterUrl) 3 -> { SystemServiceHelper.copyToClipboard(activity, "tweet text", tweet.originalTweet.text) world.notify(R.string.notice_copy_clipboard) diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/UserDetailDialogFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/dialog/UserDetailDialogFragment.kt index ca634d92..b9b60cc6 100644 --- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/UserDetailDialogFragment.kt +++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/UserDetailDialogFragment.kt @@ -41,12 +41,12 @@ import net.lacolaco.smileessence.entity.RBinding import net.lacolaco.smileessence.entity.User import net.lacolaco.smileessence.twitter.task.Timelines import net.lacolaco.smileessence.twitter.task.Users -import net.lacolaco.smileessence.util.IntentUtils import net.lacolaco.smileessence.util.UIHandler import net.lacolaco.smileessence.util.UIObserverBundle import net.lacolaco.smileessence.view.DialogHelper import net.lacolaco.smileessence.view.ThreeStateButton import net.lacolaco.smileessence.view.adapter.TimelineAdapter +import org.jetbrains.anko.browse class UserDetailDialogFragment : StackableDialogFragment(), View.OnClickListener, PullToRefreshBase.OnRefreshListener2<ListView> { private val adapter by lazy { TimelineAdapter(activity, world) } @@ -91,7 +91,7 @@ class UserDetailDialogFragment : StackableDialogFragment(), View.OnClickListener .onFail { ex -> world.notifyError(R.string.notice_r4s_failed) } .execute() } - 5 -> IntentUtils.openUri(activity, user.aclogTimelineURL) + 5 -> browse(user.aclogTimelineURL) else -> throw IllegalStateException() } } @@ -99,19 +99,19 @@ class UserDetailDialogFragment : StackableDialogFragment(), View.OnClickListener dialog.show() } R.id.imageview_user_detail_icon -> { - IntentUtils.openUri(activity, user.profileImageUrl!!) + browse(user.profileImageUrl!!) } R.id.textview_user_detail_screenname, R.id.textview_user_detail_tweet_count -> { - IntentUtils.openUri(activity, user.userHomeURL) + browse(user.userHomeURL) } R.id.textview_user_detail_friend_count -> { - IntentUtils.openUri(activity, String.format("%s/following", user.userHomeURL)) + browse(String.format("%s/following", user.userHomeURL)) } R.id.textview_user_detail_follower_count -> { - IntentUtils.openUri(activity, String.format("%s/followers", user.userHomeURL)) + browse(String.format("%s/followers", user.userHomeURL)) } R.id.textview_user_detail_favorite_count -> { - IntentUtils.openUri(activity, String.format("%s/favorites", user.userHomeURL)) + browse(String.format("%s/favorites", user.userHomeURL)) } R.id.button_user_detail_follow -> { val v = view |