Skip to content

Commit

Permalink
Bug fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamGrzybkowski committed Mar 6, 2017
1 parent e7a09d1 commit 3cd7325
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/adamg/hnreader/adapter/ItemsAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ class ItemsAdapter(var context: Context, var stories: List<Item>): RecyclerView.
var intent = Intent(context, StoryActivity::class.java)
intent.putExtra(AppConstants.ITEM, story)
context.startActivity(intent)
} else if (story.type == Type.ASK || story.type == Type.LINK && story.domain == null || story.domain == null) {
} else if ((story.type == Type.ASK || story.type == Type.LINK) && story.domain == null || story.domain == null) {
var intent = Intent(context, AskActivity::class.java)
intent.putExtra(AppConstants.ITEM, Ask.fromItem(story))
context.startActivity(intent)
} else if (story.type == Type.JOB) {
} else if ( (story.type == Type.JOB || story.type == Type.ASK) && story.domain != null) {
var intent = Intent(context, JobActivity::class.java)
intent.putExtra(AppConstants.ITEM, Job.fromItem(story))
context.startActivity(intent)
Expand Down

0 comments on commit 3cd7325

Please sign in to comment.