package org.phphub.app.common;

import android.content.Context;
import android.content.Intent;
import android.support.v4.app.FragmentActivity;

import org.phphub.app.ui.view.ScannerActivity;
import org.phphub.app.ui.view.settings.SettingsActivity;
import org.phphub.app.ui.view.topic.TopicDetailsActivity;
import org.phphub.app.ui.view.user.UserSpaceActivity;

import javax.inject.Inject;
import javax.inject.Singleton;

@Singleton
public class Navigator {
    @Inject
    public Navigator() {}

    public void navigateToTopicDetails(Context context, int topicId) {
        if (context == null) {
            return;
        }

        Intent intentToLaunch = TopicDetailsActivity.getCallingIntent(context, topicId);
        context.startActivity(intentToLaunch);
    }

    public void navigateToSettings(Context context) {
        if (context == null) {
            return;
        }

        Intent intentToLaunch = SettingsActivity.getCallingIntent(context);
        context.startActivity(intentToLaunch);
    }

    public void navigateToUserSpace(Context context, int userId) {
        if (context == null) {
            return;
        }

        Intent intentToLaunch = UserSpaceActivity.getCallingIntent(context, userId);
        context.startActivity(intentToLaunch);
    }

    public void navigateToScanner(Context context, int requestCode) {
        if (context == null) {
            return;
        }

        Intent intentToLaunch = ScannerActivity.getCallingIntent(context);
        ((FragmentActivity) context).startActivityForResult(intentToLaunch, requestCode);
    }
}
@@ -1271,32 +1271,327 @@
 Launch);%0A    %7D%0A%0A
+    public void navigateToUserSpace(Context context, int userId, String userName) %7B%0A        if (context == null) %7B%0A            return;%0A        %7D%0A%0A        Intent intentToLaunch = UserSpaceActivity.getCallingIntent(context, userId, userName);%0A        context.startActivity(intentToLaunch);%0A    %7D%0A%0A
     public void 

add arg "userName" to "navigateToUserSpace" function