diff --git a/app/src/main/java/org/pixeldroid/app/posts/feeds/cachedFeeds/notifications/NotificationsFragment.kt b/app/src/main/java/org/pixeldroid/app/posts/feeds/cachedFeeds/notifications/NotificationsFragment.kt index 82badbc0..ab76dcb9 100644 --- a/app/src/main/java/org/pixeldroid/app/posts/feeds/cachedFeeds/notifications/NotificationsFragment.kt +++ b/app/src/main/java/org/pixeldroid/app/posts/feeds/cachedFeeds/notifications/NotificationsFragment.kt @@ -81,24 +81,22 @@ class NotificationsFragment : CachedFeedFragment() { itemView.setOnClickListener { notification?.openActivity() } + avatar.setOnClickListener { + val intent = notification?.openAccountFromNotification() + itemView.context.startActivity(intent) + } } private fun Notification.openActivity() { val intent: Intent = when (type) { - Notification.NotificationType.favourite, + Notification.NotificationType.mention, Notification.NotificationType.favourite, Notification.NotificationType.poll, Notification.NotificationType.reblog -> { openPostFromNotification() } Notification.NotificationType.follow -> { openAccountFromNotification() } - Notification.NotificationType.mention -> { - /*Intent(itemView.context, PostActivity::class.java).apply { - putExtra(Status.POST_TAG, status?.in_reply_to_id) - }*/ // TODO - openPostFromNotification() - } null -> return } itemView.context.startActivity(intent) @@ -216,11 +214,6 @@ class NotificationsFragment : CachedFeedFragment() { itemView.context, lifecycleScope ) - - avatar.setOnClickListener { - val intent = notification?.openAccountFromNotification() - itemView.context.startActivity(intent) - } } companion object {