// Path: app/src/main/java/com/williammora/openfeed/events/TwitterEvents.java
// public class TwitterEvents {
// 
//     public static class OAuthRequestTokenEvent extends Event<RequestToken> {
//         public OAuthRequestTokenEvent(RequestToken result) {
//             super(result);
//         }
//     }
// 
//     public static class OAuthAccessTokenEvent extends Event<AccessToken> {
//         public OAuthAccessTokenEvent(AccessToken result) {
//             super(result);
//         }
//     }
// 
//     public static class HomeTimelineEvent extends Event<List<Status>> {
//         public HomeTimelineEvent(List<Status> result) {
//             super(result);
//         }
//     }
// 
//     public static class SearchEvent extends Event<QueryResult> {
//         public SearchEvent(QueryResult result) {
//             super(result);
//         }
//     }
// 
//     public static class UserEvent extends Event<User> {
//         public UserEvent(User result) {
//             super(result);
//         }
//     }
// 
//     public static class RetweetedStatusEvent extends Event<Status> {
//         public RetweetedStatusEvent(Status result) {
//             super(result);
//         }
//     }
// 
//     public static class CreatedFavoriteEvent extends Event<Status> {
//         public CreatedFavoriteEvent(Status result) {
//             super(result);
//         }
//     }
// 
//     public static class DestroyedFavoriteEvent extends Event<Status> {
//         public DestroyedFavoriteEvent(Status result) {
//             super(result);
//         }
//     }
// 
//     public static class DestroyedStatusEvent extends Event<Status> {
//         public DestroyedStatusEvent(Status result) {
//             super(result);
//         }
//     }
// 
// }
// 
// Path: app/src/main/java/com/williammora/openfeed/fragments/StatusFragment.java
// public class StatusFragment extends OpenFeedFragment {
// 
//     private static final String SAVED_STATUS = "SAVED_STATUS";
// 
//     private StatusViewHolder mViewHolder;
//     private Status mStatus;
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         View view = inflater.inflate(R.layout.fragment_status, container, false);
// 
//         if (savedInstanceState != null) {
//             mStatus = (Status) savedInstanceState.getSerializable(SAVED_STATUS);
//         } else {
//             mStatus = (Status) getActivity().getIntent().getSerializableExtra(StatusActivity.EXTRA_STATUS);
//         }
// 
//         mViewHolder = new StatusViewHolder(view);
// 
//         return view;
//     }
// 
//     @Override
//     public void onResume() {
//         super.onResume();
//         updateStatus(mStatus);
//     }
// 
//     @Override
//     public void onSaveInstanceState(Bundle outState) {
//         outState.putSerializable(SAVED_STATUS, mStatus);
//         super.onSaveInstanceState(outState);
//     }
// 
//     private void updateStatus(Status status) {
//         mStatus = status;
//         mViewHolder.updateView(mStatus);
//     }
// 
//     @Subscribe
//     public void onStatusRetweeted(TwitterEvents.RetweetedStatusEvent event) {
//         updateStatus(event.getResult());
//     }
// 
//     @Subscribe
//     public void onStatusDestroyed(TwitterEvents.DestroyedStatusEvent event) {
//         updateStatus(event.getResult());
//     }
// 
//     @Subscribe
//     public void onFavoriteStatusCreated(TwitterEvents.CreatedFavoriteEvent event) {
//         updateStatus(event.getResult());
//     }
// 
//     @Subscribe
//     public void onFavoriteStatusDestroyed(TwitterEvents.DestroyedFavoriteEvent event) {
//         updateStatus(event.getResult());
//     }
// }


import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import com.squareup.otto.Subscribe;
import com.williammora.openfeed.R;
import com.williammora.openfeed.events.TwitterEvents;
import com.williammora.openfeed.fragments.StatusFragment;
import twitter4j.Status;
package com.williammora.openfeed.activities;




public class StatusActivity extends OpenFeedActivity {

    public static final String EXTRA_STATUS = "EXTRA_STATUS";
    private static final String SAVED_STATUS = "SAVED_STATUS";

    private Status mStatus;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_status);
        if (savedInstanceState == null) {
            getFragmentManager().beginTransaction()
                    .add(R.id.container, new StatusFragment())
                    .commit();
        }
    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        super.onRestoreInstanceState(savedInstanceState);
        mStatus = (Status) savedInstanceState.getSerializable(SAVED_STATUS);
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        outState.putSerializable(SAVED_STATUS, mStatus);
        super.onSaveInstanceState(outState);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
// Path: app/src/main/java/com/williammora/openfeed/events/TwitterEvents.java
// public class TwitterEvents {
// 
//     public static class OAuthRequestTokenEvent extends Event<RequestToken> {
//         public OAuthRequestTokenEvent(RequestToken result) {
//             super(result);
//         }
//     }
// 
//     public static class OAuthAccessTokenEvent extends Event<AccessToken> {
//         public OAuthAccessTokenEvent(AccessToken result) {
//             super(result);
//         }
//     }
// 
//     public static class HomeTimelineEvent extends Event<List<Status>> {
//         public HomeTimelineEvent(List<Status> result) {
//             super(result);
//         }
//     }
// 
//     public static class SearchEvent extends Event<QueryResult> {
//         public SearchEvent(QueryResult result) {
//             super(result);
//         }
//     }
// 
//     public static class UserEvent extends Event<User> {
//         public UserEvent(User result) {
//             super(result);
//         }
//     }
// 
//     public static class RetweetedStatusEvent extends Event<Status> {
//         public RetweetedStatusEvent(Status result) {
//             super(result);
//         }
//     }
// 
//     public static class CreatedFavoriteEvent extends Event<Status> {
//         public CreatedFavoriteEvent(Status result) {
//             super(result);
//         }
//     }
// 
//     public static class DestroyedFavoriteEvent extends Event<Status> {
//         public DestroyedFavoriteEvent(Status result) {
//             super(result);
//         }
//     }
// 
//     public static class DestroyedStatusEvent extends Event<Status> {
//         public DestroyedStatusEvent(Status result) {
//             super(result);
//         }
//     }
// 
// }
// 
// Path: app/src/main/java/com/williammora/openfeed/fragments/StatusFragment.java
// public class StatusFragment extends OpenFeedFragment {
// 
//     private static final String SAVED_STATUS = "SAVED_STATUS";
// 
//     private StatusViewHolder mViewHolder;
//     private Status mStatus;
// 
//     @Override
//     public View onCreateView(LayoutInflater inflater, ViewGroup container,
//                              Bundle savedInstanceState) {
//         View view = inflater.inflate(R.layout.fragment_status, container, false);
// 
//         if (savedInstanceState != null) {
//             mStatus = (Status) savedInstanceState.getSerializable(SAVED_STATUS);
//         } else {
//             mStatus = (Status) getActivity().getIntent().getSerializableExtra(StatusActivity.EXTRA_STATUS);
//         }
// 
//         mViewHolder = new StatusViewHolder(view);
// 
//         return view;
//     }
// 
//     @Override
//     public void onResume() {
//         super.onResume();
//         updateStatus(mStatus);
//     }
// 
//     @Override
//     public void onSaveInstanceState(Bundle outState) {
//         outState.putSerializable(SAVED_STATUS, mStatus);
//         super.onSaveInstanceState(outState);
//     }
// 
//     private void updateStatus(Status status) {
//         mStatus = status;
//         mViewHolder.updateView(mStatus);
//     }
// 
//     @Subscribe
//     public void onStatusRetweeted(TwitterEvents.RetweetedStatusEvent event) {
//         updateStatus(event.getResult());
//     }
// 
//     @Subscribe
//     public void onStatusDestroyed(TwitterEvents.DestroyedStatusEvent event) {
//         updateStatus(event.getResult());
//     }
// 
//     @Subscribe
//     public void onFavoriteStatusCreated(TwitterEvents.CreatedFavoriteEvent event) {
//         updateStatus(event.getResult());
//     }
// 
//     @Subscribe
//     public void onFavoriteStatusDestroyed(TwitterEvents.DestroyedFavoriteEvent event) {
//         updateStatus(event.getResult());
//     }
// }


// Path: app/src/main/java/com/williammora/openfeed/activities/StatusActivity.java
import android.content.Intent;
import android.os.Bundle;
import android.view.MenuItem;
import com.squareup.otto.Subscribe;
import com.williammora.openfeed.R;
import com.williammora.openfeed.events.TwitterEvents;
import com.williammora.openfeed.fragments.StatusFragment;
import twitter4j.Status;

package com.williammora.openfeed.activities;




public class StatusActivity extends OpenFeedActivity {

    public static final String EXTRA_STATUS = "EXTRA_STATUS";
    private static final String SAVED_STATUS = "SAVED_STATUS";

    private Status mStatus;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_status);
        if (savedInstanceState == null) {
            getFragmentManager().beginTransaction()
                    .add(R.id.container, new StatusFragment())
                    .commit();
        }
    }

    @Override
    protected void onRestoreInstanceState(Bundle savedInstanceState) {
        super.onRestoreInstanceState(savedInstanceState);
        mStatus = (Status) savedInstanceState.getSerializable(SAVED_STATUS);
    }

    @Override
    protected void onSaveInstanceState(Bundle outState) {
        outState.putSerializable(SAVED_STATUS, mStatus);
        super.onSaveInstanceState(outState);
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        switch (item.getItemId()) {