Skip to content
Snippets Groups Projects
Commit a1d9462f authored by Jawnnypoo's avatar Jawnnypoo
Browse files

Fix a few crashes. Renae to "Advanced Login"

parent 2582fb75
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -240,7 +240,7 @@ public class LoginActivity extends BaseActivity {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_private_token:
case R.id.action_advanced_login:
boolean isNormalLogin = mNormalLogin.getVisibility() == View.VISIBLE;
if (isNormalLogin) {
mNormalLogin.setVisibility(View.GONE);
Loading
Loading
@@ -250,7 +250,7 @@ public class LoginActivity extends BaseActivity {
} else {
mNormalLogin.setVisibility(View.VISIBLE);
mTokenLogin.setVisibility(View.GONE);
item.setTitle(R.string.token_link);
item.setTitle(R.string.advanced_login);
mIsNormalLogin = true;
}
return true;
Loading
Loading
Loading
Loading
@@ -126,7 +126,11 @@ public class BuildDescriptionFragment extends ButterKnifeFragment {
if (finishedTime == null) {
finishedTime = new Date();
}
String timeTaken = DateUtil.getTimeTaken(build.getStartedAt(), finishedTime);
Date startedTime = build.getStartedAt();
if (startedTime == null) {
startedTime = new Date();
}
String timeTaken = DateUtil.getTimeTaken(startedTime, finishedTime);
String duration = String.format(getString(R.string.build_duration), timeTaken);
mTextDuration.setText(duration);
String created = String.format(getString(R.string.build_created), DateUtil.getRelativeTimeSpanString(getActivity(), build.getCreatedAt()));
Loading
Loading
Loading
Loading
@@ -19,6 +19,10 @@ public class RoutingRouter {
mNavigator.onRouteUnknown(null);
return;
}
if (link.getPath() == null) {
mNavigator.onRouteUnknown(link);
return;
}
if (link.getPath().contains("issues")) {
if (link.getLastPathSegment().equals("issues")) {
//this means it was just a link to something like
Loading
Loading
package com.commit451.gitlab.viewHolder;
 
import android.support.v7.widget.RecyclerView;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Loading
Loading
@@ -58,7 +59,7 @@ public class DiffHeaderViewHolder extends RecyclerView.ViewHolder {
* (the commit message also contains the commit title)
*/
private String extractMessage(String title, String message) {
if (message != null) {
if (!TextUtils.isEmpty(message)) {
boolean ellipsis = title.endsWith("\u2026") && message.charAt(title.length() - 1) != '\u2026';
String trailing = message.substring(title.length() - (ellipsis ? 1 : 0));
return trailing.equals("\u2026") ? "" : ((ellipsis ? "\u2026" : "") + trailing).trim();
Loading
Loading
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/root"
android:layout_width="match_parent"
android:layout_height="match_parent"
Loading
Loading
@@ -76,7 +77,7 @@
android:layout_width="96dp"
android:layout_height="96dp"
android:contentDescription="@null"
android:src="@drawable/ic_add_96dp"/>
app:srcCompat="@drawable/ic_add_96dp"/>
</LinearLayout>
 
</LinearLayout>
Loading
Loading
Loading
Loading
@@ -32,7 +32,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
 
<EditText
<android.support.design.widget.TextInputEditText
android:id="@+id/url_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Loading
Loading
@@ -40,9 +40,7 @@
android:layout_centerHorizontal="true"
android:hint="@string/url_hint"
android:inputType="textUri"
android:text="@string/url_gitlab">
</EditText>
android:text="@string/url_gitlab"/>
 
</android.support.design.widget.TextInputLayout>
 
Loading
Loading
@@ -74,7 +72,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
 
<EditText
<android.support.design.widget.TextInputEditText
android:id="@+id/password_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Loading
Loading
@@ -98,7 +96,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
 
<EditText
<android.support.design.widget.TextInputEditText
android:id="@+id/token_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Loading
Loading
Loading
Loading
@@ -3,8 +3,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto">
 
<item
android:id="@+id/action_private_token"
android:id="@+id/action_advanced_login"
app:showAsAction="never"
android:title="@string/token_link"/>
android:title="@string/advanced_login"/>
 
</menu>
\ No newline at end of file
Loading
Loading
@@ -79,7 +79,7 @@
<string name="token_hint">Private token</string>
<string name="login_activity">Login</string>
<string name="login_progress_dialog">Logging in. Please wait</string>
<string name="token_link">Login using private token</string>
<string name="advanced_login">Advanced Login</string>
<string name="normal_link">Login using username or email</string>
<string name="certificate_title">Certificate not trusted</string>
<string name="certificate_message">The certificate the server used was not issued by a trusted authority.\n\nThis could mean a hacker is trying to intercept your communications.\n\nIf you trust the certificate, press OK to continue.\n\nFingerprint (SHA-1):\n%1$s</string>
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