Skip to content
Snippets Groups Projects
Commit e73b1aab authored by John Carlson's avatar John Carlson
Browse files

GitLabApp -> LabCoatApp

parent a157d3fd
No related branches found
No related tags found
No related merge requests found
Pipeline #
Showing
with 58 additions and 58 deletions
Loading
Loading
@@ -8,7 +8,7 @@
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
 
<application
android:name="com.commit451.gitlab.GitLabApp"
android:name=".LabCoatApp"
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="@mipmap/ic_launcher"
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@ import timber.log.Timber;
/**
* App for one time init things and to house singletons
*/
public class GitLabApp extends Application {
public class LabCoatApp extends Application {
 
private static Bus sBus;
public static Bus bus() {
Loading
Loading
@@ -29,8 +29,8 @@ public class GitLabApp extends Application {
return sBus;
}
 
private static GitLabApp sInstance;
public static GitLabApp instance() {
private static LabCoatApp sInstance;
public static LabCoatApp instance() {
return sInstance;
}
 
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@ import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.Spinner;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.adapter.AssigneeSpinnerAdapter;
import com.commit451.gitlab.adapter.MilestoneSpinnerAdapter;
Loading
Loading
@@ -152,9 +152,9 @@ public class AddIssueActivity extends MorphActivity {
return;
}
if (mIssue == null) {
GitLabApp.bus().post(new IssueCreatedEvent(response.body()));
LabCoatApp.bus().post(new IssueCreatedEvent(response.body()));
} else {
GitLabApp.bus().post(new IssueChangedEvent(response.body()));
LabCoatApp.bus().post(new IssueChangedEvent(response.body()));
}
dismiss();
}
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@ import android.view.View;
import android.widget.Button;
import android.widget.EditText;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.api.GitLabClient;
import com.commit451.gitlab.event.MilestoneChangedEvent;
Loading
Loading
@@ -115,9 +115,9 @@ public class AddMilestoneActivity extends MorphActivity {
return;
}
if (mMilestone == null) {
GitLabApp.bus().post(new MilestoneCreatedEvent(response.body()));
LabCoatApp.bus().post(new MilestoneCreatedEvent(response.body()));
} else {
GitLabApp.bus().post(new MilestoneChangedEvent(response.body()));
LabCoatApp.bus().post(new MilestoneChangedEvent(response.body()));
}
finish();
}
Loading
Loading
Loading
Loading
@@ -17,7 +17,7 @@ import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.adapter.UsersAdapter;
import com.commit451.gitlab.api.GitLabClient;
Loading
Loading
@@ -228,7 +228,7 @@ public class AddUserActivity extends MorphActivity {
.show();
mAccessDialog.dismiss();
dismiss();
GitLabApp.bus().post(new MemberAddedEvent(response.body()));
LabCoatApp.bus().post(new MemberAddedEvent(response.body()));
}
 
@Override
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@ import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.adapter.IssueDetailsAdapter;
import com.commit451.gitlab.api.GitLabClient;
Loading
Loading
@@ -167,8 +167,8 @@ public class IssueActivity extends BaseActivity {
return;
}
mIssue = response.body();
GitLabApp.bus().post(new IssueChangedEvent(mIssue));
GitLabApp.bus().post(new IssueReloadEvent());
LabCoatApp.bus().post(new IssueChangedEvent(mIssue));
LabCoatApp.bus().post(new IssueReloadEvent());
setOpenCloseMenuStatus();
loadNotes();
}
Loading
Loading
@@ -209,7 +209,7 @@ public class IssueActivity extends BaseActivity {
setContentView(R.layout.activity_issue);
ButterKnife.bind(this);
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mProject = Parcels.unwrap(getIntent().getParcelableExtra(EXTRA_PROJECT));
mIssue = Parcels.unwrap(getIntent().getParcelableExtra(EXTRA_SELECTED_ISSUE));
Loading
Loading
@@ -253,7 +253,7 @@ public class IssueActivity extends BaseActivity {
@Override
protected void onDestroy() {
super.onDestroy();
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
private void bindIssue() {
Loading
Loading
Loading
Loading
@@ -19,7 +19,7 @@ import android.view.KeyEvent;
import android.view.View;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.api.GitLabClient;
import com.commit451.gitlab.data.Prefs;
Loading
Loading
@@ -195,9 +195,9 @@ public class LoginActivity extends BaseActivity {
mAccount.setLastUsed(new Date());
Prefs.addAccount(LoginActivity.this, mAccount);
GitLabClient.setAccount(mAccount);
GitLabApp.bus().post(new LoginEvent(mAccount));
LabCoatApp.bus().post(new LoginEvent(mAccount));
//This is mostly for if projects already exists, then we will reload the data
GitLabApp.bus().post(new ReloadDataEvent());
LabCoatApp.bus().post(new ReloadDataEvent());
NavigationManager.navigateToProjects(LoginActivity.this);
finish();
}
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@ import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.adapter.MilestoneIssuesAdapter;
import com.commit451.gitlab.api.GitLabClient;
Loading
Loading
@@ -154,7 +154,7 @@ public class MilestoneActivity extends BaseActivity {
setContentView(R.layout.activity_milestone);
ButterKnife.bind(this);
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mProject = Parcels.unwrap(getIntent().getParcelableExtra(EXTRA_PROJECT));
mMilestone = Parcels.unwrap(getIntent().getParcelableExtra(EXTRA_MILESTONE));
Loading
Loading
@@ -191,7 +191,7 @@ public class MilestoneActivity extends BaseActivity {
@Override
protected void onDestroy() {
super.onDestroy();
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
private void bind(Milestone milestone) {
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@ import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.adapter.SectionsPagerAdapter;
import com.commit451.gitlab.api.GitLabClient;
Loading
Loading
@@ -205,7 +205,7 @@ public class ProjectActivity extends BaseActivity {
}
 
private void broadcastLoad() {
GitLabApp.bus().post(new ProjectReloadEvent(mProject, mBranchName));
LabCoatApp.bus().post(new ProjectReloadEvent(mProject, mBranchName));
}
 
@Override
Loading
Loading
Loading
Loading
@@ -12,7 +12,7 @@ import android.support.v7.widget.Toolbar;
import android.view.MenuItem;
import android.view.View;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.adapter.ProjectsPagerAdapter;
import com.commit451.gitlab.event.CloseDrawerEvent;
Loading
Loading
@@ -59,7 +59,7 @@ public class ProjectsActivity extends BaseActivity {
setContentView(R.layout.activity_projects);
ButterKnife.bind(this);
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mToolbar.setTitle(R.string.projects);
mToolbar.setNavigationIcon(R.drawable.ic_menu_24dp);
Loading
Loading
@@ -78,7 +78,7 @@ public class ProjectsActivity extends BaseActivity {
@Override
protected void onDestroy() {
super.onDestroy();
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
private class EventReceiver {
Loading
Loading
package com.commit451.gitlab.api;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.model.Account;
import com.commit451.gitlab.provider.GsonProvider;
import com.commit451.gitlab.provider.OkHttpClientProvider;
Loading
Loading
@@ -82,7 +82,7 @@ public final class GitLabClient {
 
public static Picasso getPicasso(Account account) {
checkAccountSet();
return new Picasso.Builder(GitLabApp.instance())
return new Picasso.Builder(LabCoatApp.instance())
.downloader(new OkHttpDownloader(OkHttpClientProvider.getInstance(account)))
.build();
}
Loading
Loading
@@ -97,7 +97,7 @@ public final class GitLabClient {
 
private static void checkAccountSet() {
if (sAccount == null) {
List<Account> accounts = Account.getAccounts(GitLabApp.instance());
List<Account> accounts = Account.getAccounts(LabCoatApp.instance());
GitLabClient.setAccount(accounts.get(0));
}
}
Loading
Loading
package com.commit451.gitlab.fragment;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.event.ReloadDataEvent;
import com.squareup.otto.Subscribe;
 
Loading
Loading
@@ -17,13 +17,13 @@ public class BaseFragment extends Fragment{
super.onViewCreated(view, savedInstanceState);
 
mBaseEventReceiever = new EventReceiver();
GitLabApp.bus().register(mBaseEventReceiever);
LabCoatApp.bus().register(mBaseEventReceiever);
}
 
@Override
public void onDestroyView() {
super.onDestroyView();
GitLabApp.bus().unregister(mBaseEventReceiever);
LabCoatApp.bus().unregister(mBaseEventReceiever);
}
 
protected void loadData() {
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.activity.DiffActivity;
import com.commit451.gitlab.activity.ProjectActivity;
Loading
Loading
@@ -151,7 +151,7 @@ public class CommitsFragment extends BaseFragment {
ButterKnife.bind(this, view);
 
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mCommitsAdapter = new CommitsAdapter(mCommitsAdapterListener);
mCommitsLayoutManager = new LinearLayoutManager(getActivity());
Loading
Loading
@@ -179,7 +179,7 @@ public class CommitsFragment extends BaseFragment {
public void onDestroyView() {
super.onDestroyView();
ButterKnife.unbind(this);
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
@Override
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.adapter.FeedAdapter;
import com.commit451.gitlab.api.GitLabClient;
Loading
Loading
@@ -114,7 +114,7 @@ public class FeedFragment extends BaseFragment {
ButterKnife.bind(this, view);
 
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mFeedAdapter = new FeedAdapter(mFeedAdapterListener);
mEntryListView.setLayoutManager(new LinearLayoutManager(getActivity()));
Loading
Loading
@@ -134,7 +134,7 @@ public class FeedFragment extends BaseFragment {
public void onDestroyView() {
super.onDestroyView();
ButterKnife.unbind(this);
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
@Override
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.activity.ProjectActivity;
import com.commit451.gitlab.adapter.BreadcrumbAdapter;
Loading
Loading
@@ -160,7 +160,7 @@ public class FilesFragment extends BaseFragment {
ButterKnife.bind(this, view);
 
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mFilesAdapter = new FilesAdapter(mFilesAdapterListener);
mFilesListView.setLayoutManager(new LinearLayoutManager(getActivity()));
Loading
Loading
@@ -190,7 +190,7 @@ public class FilesFragment extends BaseFragment {
public void onDestroyView() {
super.onDestroyView();
ButterKnife.unbind(this);
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
@Override
Loading
Loading
Loading
Loading
@@ -10,7 +10,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.adapter.GroupMembersAdapter;
import com.commit451.gitlab.api.GitLabClient;
Loading
Loading
@@ -182,7 +182,7 @@ public class GroupMembersFragment extends BaseFragment {
ButterKnife.bind(this, view);
 
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mGroupMembersAdapter = new GroupMembersAdapter(mListener);
mRecyclerView.setLayoutManager(new GridLayoutManager(getActivity(), 2));
Loading
Loading
@@ -202,7 +202,7 @@ public class GroupMembersFragment extends BaseFragment {
public void onDestroyView() {
super.onDestroyView();
ButterKnife.unbind(this);
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
@OnClick(R.id.add_user_button)
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.activity.ProjectActivity;
import com.commit451.gitlab.adapter.IssuesAdapter;
Loading
Loading
@@ -184,7 +184,7 @@ public class IssuesFragment extends BaseFragment {
ButterKnife.bind(this, view);
 
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mIssuesAdapter = new IssuesAdapter(mIssuesAdapterListener);
mIssuesLayoutManager = new LinearLayoutManager(getActivity());
Loading
Loading
@@ -214,7 +214,7 @@ public class IssuesFragment extends BaseFragment {
public void onDestroyView() {
super.onDestroyView();
ButterKnife.unbind(this);
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
@OnClick(R.id.add_issue_button)
Loading
Loading
Loading
Loading
@@ -13,7 +13,7 @@ import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.activity.ProjectActivity;
import com.commit451.gitlab.adapter.MergeRequestAdapter;
Loading
Loading
@@ -174,7 +174,7 @@ public class MergeRequestsFragment extends BaseFragment {
ButterKnife.bind(this, view);
 
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mMergeRequestAdapter = new MergeRequestAdapter(mMergeRequestAdapterListener);
mMergeLayoutManager = new LinearLayoutManager(getActivity());
Loading
Loading
@@ -204,7 +204,7 @@ public class MergeRequestsFragment extends BaseFragment {
public void onDestroyView() {
super.onDestroyView();
ButterKnife.unbind(this);
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
@Override
Loading
Loading
Loading
Loading
@@ -14,7 +14,7 @@ import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.activity.ProjectActivity;
import com.commit451.gitlab.adapter.MilestoneAdapter;
Loading
Loading
@@ -189,7 +189,7 @@ public class MilestonesFragment extends BaseFragment {
ButterKnife.bind(this, view);
 
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mMilestoneAdapter = new MilestoneAdapter(mMilestoneListener);
mMilestoneLayoutManager = new LinearLayoutManager(getActivity());
Loading
Loading
@@ -219,7 +219,7 @@ public class MilestonesFragment extends BaseFragment {
public void onDestroyView() {
super.onDestroyView();
ButterKnife.unbind(this);
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
@Override
Loading
Loading
Loading
Loading
@@ -11,7 +11,7 @@ import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
 
import com.commit451.gitlab.GitLabApp;
import com.commit451.gitlab.LabCoatApp;
import com.commit451.gitlab.R;
import com.commit451.gitlab.activity.ProjectActivity;
import com.commit451.gitlab.api.GitLabClient;
Loading
Loading
@@ -155,7 +155,7 @@ public class OverviewFragment extends BaseFragment {
ButterKnife.bind(this, view);
 
mEventReceiver = new EventReceiver();
GitLabApp.bus().register(mEventReceiver);
LabCoatApp.bus().register(mEventReceiver);
 
mOverviewVew.setMovementMethod(LinkMovementMethod.getInstance());
 
Loading
Loading
@@ -180,7 +180,7 @@ public class OverviewFragment extends BaseFragment {
public void onDestroyView() {
super.onDestroyView();
ButterKnife.unbind(this);
GitLabApp.bus().unregister(mEventReceiver);
LabCoatApp.bus().unregister(mEventReceiver);
}
 
@Override
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment