Skip to content
Snippets Groups Projects
Commit b7633464 authored by Michi302's avatar Michi302
Browse files

Merge branch 'master' into fdroid

# Conflicts:
#	app/build.gradle
#	build.gradle
parents a7c1cae6 9ba52ee0
No related branches found
No related tags found
No related merge requests found
Pipeline #
Showing
with 83 additions and 36 deletions
def versionMajor = 2
def versionMinor = 2
def versionPatch = 6
def versionBuild = 1 // bump for dogfood builds, public betas, etc.
def versionBuild = 2 // bump for dogfood builds, public betas, etc.
 
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
Loading
Loading
@@ -47,39 +47,39 @@ dependencies {
compile 'com.android.support:palette-v7:24.0.0'
compile 'com.android.support:customtabs:24.0.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.github.aurae.retrofit2:converter-logansquare:1.4.0'
compile 'com.github.aurae.retrofit2:converter-logansquare:1.4.1'
compile('com.squareup.retrofit2:converter-simplexml:2.1.0') {
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}
compile 'com.squareup.okhttp3:okhttp:3.3.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.0.2'
compile 'com.squareup:otto:1.3.8'
compile 'io.reactivex:rxjava:1.1.6'
compile 'io.reactivex:rxandroid:1.2.0'
compile 'com.jakewharton:butterknife:8.1.0'
apt 'com.jakewharton:butterknife-compiler:8.1.0'
compile 'io.reactivex:rxjava:1.1.7'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'com.jakewharton:butterknife:8.2.0'
apt 'com.jakewharton:butterknife-compiler:8.2.0'
compile 'com.jakewharton.timber:timber:4.1.2'
apt 'com.bluelinelabs:logansquare-compiler:1.3.7'
compile 'com.bluelinelabs:logansquare:1.3.7'
compile 'net.danlew:android.joda:2.9.3.1'
compile 'net.danlew:android.joda:2.9.4.1'
compile 'org.parceler:parceler-api:1.1.5'
apt 'org.parceler:parceler:1.1.5'
compile 'com.commit451:bypasses:1.0.1'
compile 'com.commit451:easel:0.0.5'
compile 'com.commit451:foregroundviews:1.0.0'
compile 'com.commit451:elasticdragdismisslayout:1.0.2'
compile 'com.commit451:adapterlayout:1.0.1'
compile 'com.github.Commit451:AdapterLayout:1.0.2'
compile 'com.github.Commit451:Easel:1.0.0'
compile 'com.github.Commit451:Gimbal:1.0.0'
compile 'com.github.Commit451:Teleprinter:1.0.2'
compile 'com.github.Commit451:BypassPicassoImageGetter:1.0.0'
compile 'com.github.Commit451:Jounce:1.0.1'
compile 'com.github.Commit451:EasyCallback:1.0.0'
compile 'com.github.Commit451:ForegroundViews:2.1.0'
compile 'com.pnikosis:materialish-progress:1.7'
compile 'com.jawnnypoo:physicslayout:1.0.1'
compile 'com.github.Jawnnypoo:PhysicsLayout:2.0.0'
compile 'com.alexgwyn.recyclerviewsquire:recyclerviewsquire:0.0.5'
compile 'com.github.ivbaranov:materiallettericon:0.2.2'
compile 'com.github.johnkil.android-robototextview:robototextview:2.5.0'
Loading
Loading
@@ -88,10 +88,10 @@ dependencies {
compile 'com.wefika:flowlayout:0.4.1'
compile 'com.github.novoda:simple-chrome-custom-tabs:0.1.3-rc1'
 
compile('com.github.afollestad.material-dialogs:core:0.8.5.8@aar') {
compile('com.github.afollestad.material-dialogs:core:0.8.6.1@aar') {
transitive = true
}
compile('com.github.afollestad.material-dialogs:commons:0.8.5.8@aar') {
compile('com.github.afollestad.material-dialogs:commons:0.8.6.1@aar') {
transitive = true
}
}
Loading
Loading
@@ -142,11 +142,8 @@ public class AboutActivity extends BaseActivity {
}
 
private void addContributors(List<Contributor> contributors) {
PhysicsConfig config = new PhysicsConfig.Builder()
.setShapeType(PhysicsConfig.ShapeType.CIRCLE)
.setDensity(1.0f)
.setRestitution(0.0f)
.build();
PhysicsConfig config = PhysicsConfig.create();
config.shapeType = PhysicsConfig.SHAPE_TYPE_CIRCLE;
int x = 0;
int y = 0;
int imageSize = getResources().getDimensionPixelSize(R.dimen.circle_size);
Loading
Loading
Loading
Loading
@@ -23,6 +23,7 @@ import com.commit451.gitlab.api.GitLabClient;
import com.commit451.gitlab.event.MilestoneChangedEvent;
import com.commit451.gitlab.event.MilestoneCreatedEvent;
import com.commit451.gitlab.model.api.Milestone;
import com.commit451.teleprinter.Teleprinter;
import com.wdullaer.materialdatetimepicker.date.DatePickerDialog;
 
import org.parceler.Parcels;
Loading
Loading
@@ -88,6 +89,7 @@ public class AddMilestoneActivity extends MorphActivity {
long mProjectId;
Milestone mMilestone;
Date mCurrentDate;
Teleprinter mTeleprinter;
 
private final DatePickerDialog.OnDateSetListener mOnDateSetListener = new DatePickerDialog.OnDateSetListener() {
@Override
Loading
Loading
@@ -135,6 +137,7 @@ public class AddMilestoneActivity extends MorphActivity {
setContentView(R.layout.activity_add_milestone);
ButterKnife.bind(this);
morph(mRoot);
mTeleprinter = new Teleprinter(this);
mProjectId = getIntent().getLongExtra(KEY_PROJECT_ID, -1);
mMilestone = Parcels.unwrap(getIntent().getParcelableExtra(KEY_MILESTONE));
if (mMilestone != null) {
Loading
Loading
@@ -160,6 +163,7 @@ public class AddMilestoneActivity extends MorphActivity {
}
 
private void createMilestone() {
mTeleprinter.hideKeyboard();
if (TextUtils.isEmpty(mTitle.getText())) {
mTitleTextInputLayout.setError(getString(R.string.required_field));
return;
Loading
Loading
Loading
Loading
@@ -7,6 +7,7 @@ import android.widget.Toast;
 
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.afollestad.materialdialogs.Theme;
import com.commit451.gitlab.R;
import com.commit451.easycallback.EasyCallback;
import com.commit451.gitlab.api.GitLabClient;
Loading
Loading
@@ -24,6 +25,11 @@ import timber.log.Timber;
public class AccessDialog extends MaterialDialog {
 
void onApply() {
if (getSelectedIndex() == -1) {
Toast.makeText(getContext(), R.string.please_select_access_level, Toast.LENGTH_LONG)
.show();
return;
}
String accessLevel = mRoleNames[getSelectedIndex()];
if (accessLevel == null) {
Toast.makeText(getContext(), R.string.please_select_access_level, Toast.LENGTH_LONG)
Loading
Loading
@@ -83,6 +89,7 @@ public class AccessDialog extends MaterialDialog {
return true;
}
})
.theme(Theme.DARK)
.progress(true, 0) // So we can later show loading progress
.positiveText(R.string.action_apply)
.negativeText(R.string.md_cancel_label));
Loading
Loading
package com.commit451.gitlab.fragment;
 
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AlertDialog;
import android.text.Html;
import android.text.TextUtils;
import android.text.method.LinkMovementMethod;
Loading
Loading
@@ -33,6 +35,9 @@ import java.util.List;
import butterknife.BindView;
import butterknife.OnClick;
import in.uncod.android.bypass.Bypass;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
Loading
Loading
@@ -78,7 +83,17 @@ public class ProjectFragment extends ButterKnifeFragment {
@OnClick(R.id.root_fork)
void onForkClicked() {
if (mProject != null) {
GitLabClient.instance().forkProject(mProject.getId()).enqueue(mForkCallback);
new AlertDialog.Builder(getActivity())
.setTitle(R.string.project_fork_title)
.setMessage(R.string.project_fork_message)
.setNegativeButton(android.R.string.cancel, null)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
GitLabClient.instance().forkProject(mProject.getId()).enqueue(mForkCallback);
}
})
.show();
}
}
 
Loading
Loading
@@ -174,9 +189,9 @@ public class ProjectFragment extends ButterKnifeFragment {
}
};
 
private EasyCallback<Void> mForkCallback = new EasyCallback<Void>() {
private Callback<Void> mForkCallback = new Callback<Void>() {
@Override
public void success(@NonNull Void response) {
public void onResponse(Call<Void> call, Response<Void> response) {
if (getView() == null) {
return;
}
Loading
Loading
@@ -185,7 +200,7 @@ public class ProjectFragment extends ButterKnifeFragment {
}
 
@Override
public void failure(Throwable t) {
public void onFailure(Call<Void> call, Throwable t) {
if (getView() == null) {
return;
}
Loading
Loading
Loading
Loading
@@ -5,27 +5,34 @@ import android.content.Intent;
import android.net.Uri;
import android.widget.Toast;
 
import com.commit451.gitlab.R;import com.novoda.simplechromecustomtabs.navigation.NavigationFallback;
import com.commit451.gitlab.R;
import com.novoda.simplechromecustomtabs.navigation.NavigationFallback;
import java.lang.ref.WeakReference;
 
/**
* A fallback to open the url in the browser
*/
public class BrowserFallback implements NavigationFallback {
 
private Context mContext;
private WeakReference<Context> mContext;
 
public BrowserFallback(Context context) {
mContext = context;
mContext = new WeakReference<>(context);
}
 
@Override
public void onFallbackNavigateTo(Uri url) {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(url);
Context context = mContext.get();
if (context == null) {
return;
}
try {
mContext.startActivity(i);
context.startActivity(i);
} catch (Exception e) {
Toast.makeText(mContext, R.string.error_no_browser, Toast.LENGTH_SHORT)
Toast.makeText(context, R.string.error_no_browser, Toast.LENGTH_SHORT)
.show();
}
}
Loading
Loading
Loading
Loading
@@ -6,24 +6,30 @@ import com.commit451.gitlab.R;
import com.novoda.simplechromecustomtabs.navigation.IntentCustomizer;
import com.novoda.simplechromecustomtabs.navigation.SimpleChromeCustomTabsIntentBuilder;
 
import java.lang.ref.WeakReference;
/**
* Customize custom intents
*/
public class LabCoatIntentCustomizer implements IntentCustomizer {
 
private Activity mActivity;
private WeakReference<Activity> mActivity;
private int mToolbarColor;
 
public LabCoatIntentCustomizer(Activity activity, int toolbarColor) {
mActivity = activity;
mActivity = new WeakReference<>(activity);
mToolbarColor = toolbarColor;
}
 
@Override
public SimpleChromeCustomTabsIntentBuilder onCustomiseIntent(SimpleChromeCustomTabsIntentBuilder simpleChromeCustomTabsIntentBuilder) {
Activity activity = mActivity.get();
if (activity == null) {
return simpleChromeCustomTabsIntentBuilder;
}
return simpleChromeCustomTabsIntentBuilder
.withStartAnimations(mActivity, R.anim.fade_in, R.anim.do_nothing)
.withExitAnimations(mActivity, R.anim.do_nothing, R.anim.fade_out)
.withStartAnimations(activity, R.anim.fade_in, R.anim.do_nothing)
.withExitAnimations(activity, R.anim.do_nothing, R.anim.fade_out)
.withToolbarColor(mToolbarColor);
}
}
Loading
Loading
@@ -46,6 +46,10 @@ public class CommitViewHolder extends RecyclerView.ViewHolder {
 
mMessageView.setText(commit.getTitle());
mAuthorView.setText(commit.getAuthorName());
mTimeView.setText(DateUtils.getRelativeTimeSpanString(itemView.getContext(), commit.getCreatedAt()));
if (commit.getCreatedAt() != null) {
mTimeView.setText(DateUtils.getRelativeTimeSpanString(itemView.getContext(), commit.getCreatedAt()));
} else {
mTimeView.setText(R.string.unknown);
}
}
}
Loading
Loading
@@ -58,6 +58,9 @@ public class FeedRemoteViewsFactory implements RemoteViewsService.RemoteViewsFac
public RemoteViews getViewAt(int position) {
// position will always range from 0 to getCount() - 1.
 
if (position >= mEntries.size()) {
return null;
}
Entry entry = mEntries.get(position);
 
RemoteViews rv = new RemoteViews(mContext.getPackageName(), R.layout.widget_item_entry);
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@
android:scaleType="centerCrop"
android:src="@drawable/header"/>
 
<com.commit451.foregroundimageview.ForegroundImageView
<com.commit451.foregroundviews.ForegroundImageView
android:id="@+id/profile_image"
android:layout_width="@dimen/larger_image_size"
android:layout_height="@dimen/larger_image_size"
Loading
Loading
<?xml version="1.0" encoding="utf-8"?>
<resources>
 
<!-- General -->
<string name="app_name">LabCoat</string>
<string name="unknown">Unknown</string>
 
<!-- Drawer -->
<string name="nav_projects">Projects</string>
Loading
Loading
@@ -154,6 +156,8 @@
<string name="fork_failed">Failed to fork project</string>
<string name="project_unstarred">Project unstarred</string>
<string name="unstar_failed">Failed to unstar project</string>
<string name="project_fork_title">Fork Project</string>
<string name="project_fork_message">Do you want to fork this project?</string>
<!-- Commits -->
<string name="no_commits_found">No commits found.</string>
 
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
//check with ./gradlew dependencyUpdates
classpath 'com.github.ben-manes:gradle-versions-plugin:0.12.0'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.13.0'
}
}
 
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