Skip to content
Snippets Groups Projects
Commit 07d75601 authored by Jawn's avatar Jawn
Browse files

Fix some crashes. Get rid of save on issues since it is broken

parent 87e05ac6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -5,7 +5,6 @@ import android.os.Bundle;
import android.support.design.widget.Snackbar;
import android.support.v7.widget.Toolbar;
import android.text.method.LinkMovementMethod;
import android.view.MenuItem;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
Loading
Loading
@@ -87,21 +86,6 @@ public class IssueActivity extends BaseActivity {
}
});
toolbar.setTitle("Issue #" + tempId);
toolbar.inflateMenu(R.menu.issue);
toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch(item.getItemId()) {
case android.R.id.home:
finish();
return true;
case R.id.action_save:
save();
return true;
}
return false;
}
});
title.setText(Repository.selectedIssue.getTitle());
Loading
Loading
@@ -253,24 +237,6 @@ public class IssueActivity extends BaseActivity {
}
};
private void save() {
pd = ProgressDialog.show(IssueActivity.this, "", getResources().getString(R.string.progress_dialog), true);
String selection = stateSpinner.getSelectedItem().toString();
String value = "";
if(selection.equals("closed") && (Repository.selectedIssue.getState().equals("opened") || Repository.selectedIssue.getState().equals("reopened")))
value = "close";
if((selection.equals("reopened") || selection.equals("opened")) && Repository.selectedIssue.getState().equals("closed"))
value = "reopen";
GitLabClient.instance().editIssue(
Repository.selectedProject.getId(),
Repository.selectedIssue.getId(),
value,
"",
issueCallback);
}
private Callback<Issue> issueCallback = new Callback<Issue>() {
@Override
Loading
Loading
Loading
Loading
@@ -374,7 +374,7 @@ public class MainActivity extends BaseActivity {
if(pd != null && pd.isShowing())
pd.cancel();
 
if(e.getResponse().getStatus() == 500) {
if(e.getResponse() != null && e.getResponse().getStatus() == 500) {
Repository.selectedBranch = null;
loadData();
return;
Loading
Loading
Loading
Loading
@@ -5,6 +5,7 @@ import android.content.SharedPreferences;
import android.preference.PreferenceManager;
 
/**
* Shared prefs things
* Created by Jawn on 7/28/2015.
*/
public class Prefs {
Loading
Loading
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/action_save"
app:showAsAction="ifRoom"
android:title="@string/action_save"
android:icon="@drawable/ic_save"/>
</menu>
\ No newline at end of file
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