mirror of
https://codeberg.org/gitnex/GitNex
synced 2024-12-23 00:48:57 +01:00
Fixing toasty bug. (#412)
Fixing toasty bug. Co-authored-by: opyale <example@example.com> Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/412 Reviewed-by: 6543 <6543@noreply.gitea.io>
This commit is contained in:
parent
9cbcb1f87b
commit
13dbbe3ec7
@ -108,13 +108,18 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
|
||||
|
||||
if(response.isSuccessful()) {
|
||||
|
||||
assert response.body() != null;
|
||||
tinyDb.putBoolean("repoWatch", response.body().getSubscribed());
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
tinyDb.putBoolean("repoWatch", false);
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
if(response.code() != 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -101,13 +101,18 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
|
||||
|
||||
if(response.isSuccessful()) {
|
||||
|
||||
assert response.body() != null;
|
||||
tinyDb.putBoolean("repoWatch", response.body().getSubscribed());
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
tinyDb.putBoolean("repoWatch", false);
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
if(response.code() != 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -108,13 +108,18 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
||||
|
||||
if(response.isSuccessful()) {
|
||||
|
||||
assert response.body() != null;
|
||||
tinyDb.putBoolean("repoWatch", response.body().getSubscribed());
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
tinyDb.putBoolean("repoWatch", false);
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
if(response.code() != 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -105,13 +105,18 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
|
||||
|
||||
if(response.isSuccessful()) {
|
||||
|
||||
assert response.body() != null;
|
||||
tinyDb.putBoolean("repoWatch", response.body().getSubscribed());
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
tinyDb.putBoolean("repoWatch", false);
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
if(response.code() != 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -105,13 +105,18 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
|
||||
|
||||
if(response.isSuccessful()) {
|
||||
|
||||
assert response.body() != null;
|
||||
tinyDb.putBoolean("repoWatch", response.body().getSubscribed());
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
tinyDb.putBoolean("repoWatch", false);
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
if(response.code() != 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user