package com.kickstarter.ui.views;

import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v7.widget.Toolbar;
import android.util.AttributeSet;
import android.widget.TextView;

import com.kickstarter.KsrApplication;
import com.kickstarter.R;
import com.kickstarter.libs.CurrentUser;

import javax.inject.Inject;

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;
import timber.log.Timber;

public class CommentFeedToolbar extends Toolbar {
  @InjectView(R.id.comment_button) TextView commentButton;
  @Inject CurrentUser currentUser;

  public CommentFeedToolbar(final Context context) {
    super(context);
  }

  public CommentFeedToolbar(final Context context, final AttributeSet attrs) {
    super(context, attrs);
  }

  public CommentFeedToolbar(final Context context, final AttributeSet attrs, final int defStyleAttr) {
    super(context, attrs, defStyleAttr);
  }

  @Override
  protected void onFinishInflate() {
    super.onFinishInflate();
    ButterKnife.inject(this);
    ((KsrApplication) getContext().getApplicationContext()).component().inject(this);
  }

  @Nullable
  @OnClick(R.id.comment_button)
  public void postComment() {
    // if logged in, post
    Timber.d("post comment");
  }
}

@@ -28,16 +28,43 @@
 views;%0A%0A
+import android.app.Dialog;%0A
 import a
@@ -267,118 +267,9 @@
 ter.
-KsrApplication;%0Aimport com.kickstarter.R;%0Aimport com.kickstarter.libs.CurrentUser;%0A%0Aimport javax.inject.Inject
+R
 ;%0A%0Ai
@@ -497,43 +497,8 @@
 ton;
-%0A  @Inject CurrentUser currentUser;
 %0A%0A  
@@ -947,224 +947,218 @@
 ;%0A  
-  ((KsrApplication) getContext().getApplicationContext()).component().inject(this);%0A  %7D%0A%0A  @Nullable%0A  @OnClick(R.id.comment_button)%0A  public void postComment() %7B%0A    // if logged in, post%0A    Timber.d(%22post comment%22
+%7D%0A%0A  @Nullable%0A  @OnClick(R.id.comment_button)%0A  public void postComment() %7B%0A    Timber.d(%22post comment%22);%0A%0A    Dialog dialog = new Dialog(getContext());%0A    dialog.setTitle(%22Leave a comment%22);%0A    dialog.show(
 );%0A 

Update comment toolbar