Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void onDataReceived(List<List<ConjugationFragment>> conjugations) {
public void onError(Throwable e) {
e.printStackTrace();
Utils.handleError(e, ConjugationActivity.this,4,
(dialogInterface, i) -> ConjugationActivity.this.onBackPressed());
(dialogInterface, i) -> ConjugationActivity.this.finish());
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public void onError(Throwable e) {
e.printStackTrace();
AppCompatActivity activity = ConjugatorActivity.this;
Utils.handleError(e, activity,11,
(dialogInterface, i) -> activity.onBackPressed());
(dialogInterface, i) -> activity.finish());
}

@Override
Expand Down Expand Up @@ -183,7 +183,7 @@ public void onDataReceived(List<List<ConjugationFragment>> conjugations) {
public void onError(Throwable e) {
e.printStackTrace();
Utils.handleError(e, ConjugatorActivity.this,10,
(dialogInterface, i) -> ConjugatorActivity.this.onBackPressed());
(dialogInterface, i) -> ConjugatorActivity.this.finish());
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected void onCreate(Bundle savedInstanceState) {
// Make sure extras were passed
if(id == null){
Exception exception = new Exception("ID was null in DisplayActivity");
Utils.handleError(exception, this, 5, (dialogInterface, i) -> onBackPressed());
Utils.handleError(exception, this, 5, (dialogInterface, i) -> finish());
return;
}

Expand All @@ -66,7 +66,7 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public void onError(Throwable t) {
t.printStackTrace();
Utils.handleError(t, DisplayActivity.this,2, (dialogInterface, i) -> DisplayActivity.this.onBackPressed());
Utils.handleError(t, DisplayActivity.this,2, (dialogInterface, i) -> DisplayActivity.this.finish());
}

@Override
Expand Down Expand Up @@ -111,7 +111,7 @@ public void onComplete() {
// If no conjugations, create an empty list to prevent a null exception
.map(o -> o instanceof String
? new FavoritesQuery.Data(new ArrayList<>())
: ((Response<FavoritesQuery.Data>) o).data())
: ((Response<FavoritesQuery.Data>) o).getData())
.subscribeWith(observer);

LinearLayout linearLayout = findViewById(R.id.disp_root);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void onNext(Response<SearchQuery.Data> dataResponse) {
@Override
public void onError(Throwable e) {
e.printStackTrace();
Utils.handleError(e, SearchActivity.this, 1, (dialogInterface, i) -> SearchActivity.this.onBackPressed());
Utils.handleError(e, SearchActivity.this, 1, (dialogInterface, i) -> SearchActivity.this.finish());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected void onCreate(Bundle savedInstanceState) {
String query = getIntent().getStringExtra(EXTRA_QUERY);
if(query == null){ // Null check for extra
Exception exception = new Exception("Query was null in SearchResultsActivity");
Utils.handleError(exception, this, 6, (dialogInterface, i) -> onBackPressed());
Utils.handleError(exception, this, 6, (dialogInterface, i) -> finish());
return;
}

Expand Down Expand Up @@ -130,7 +130,7 @@ public void onNext(Response<SearchQuery.Data> dataResponse) {
@Override
public void onError(Throwable e) {
e.printStackTrace();
Utils.handleError(e, SearchResultsActivity.this, 3, (dialogInterface, i) -> SearchResultsActivity.this.onBackPressed());
Utils.handleError(e, SearchResultsActivity.this, 3, (dialogInterface, i) -> SearchResultsActivity.this.finish());
}

@Override
Expand Down