App wide UI changes and refactors (#630)
Enhance and update the buttons across the app, colorful animation on tap update toasty in view models update toasty in fragments update toasty in actions, activities, adapters Alert dialogs buttons arrangements strings fixes switch to fab buttons remove snackbar Enhance whole app UI, bring consistency among the elements Co-authored-by: M M Arif <mmarif@swatian.com> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/630
This commit is contained in:
@@ -93,7 +93,7 @@ public class DraftsAdapter extends RecyclerView.Adapter<DraftsAdapter.DraftsView
|
||||
draftsList.remove(position);
|
||||
notifyItemRemoved(position);
|
||||
notifyItemRangeChanged(position, draftsList.size());
|
||||
Toasty.info(mCtx, mCtx.getResources().getString(R.string.draftsSingleDeleteSuccess));
|
||||
Toasty.success(mCtx, mCtx.getResources().getString(R.string.draftsSingleDeleteSuccess));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
|
||||
|
||||
if(response.code() != 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
Toasty.error(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepo
|
||||
public void onFailure(@NonNull Call<WatchInfo> call, @NonNull Throwable t) {
|
||||
|
||||
tinyDb.putBoolean("repoWatch", false);
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
Toasty.error(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -62,7 +62,7 @@ public class FilesAdapter extends RecyclerView.Adapter<FilesAdapter.FilesViewHol
|
||||
filesListener.onClickDir(fileName.getText().toString());
|
||||
}
|
||||
else {
|
||||
Toasty.info(context, context.getString(R.string.filesGenericError));
|
||||
Toasty.warning(context, context.getString(R.string.filesGenericError));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -242,7 +242,7 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
|
||||
if(response.code() == 204) {
|
||||
|
||||
updateAdapter(position);
|
||||
Toasty.info(ctx, ctx.getResources().getString(R.string.deleteCommentSuccess));
|
||||
Toasty.success(ctx, ctx.getResources().getString(R.string.deleteCommentSuccess));
|
||||
|
||||
}
|
||||
else if(response.code() == 401) {
|
||||
@@ -255,17 +255,17 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
|
||||
}
|
||||
else if(response.code() == 403) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.authorizeError));
|
||||
Toasty.error(ctx, ctx.getString(R.string.authorizeError));
|
||||
|
||||
}
|
||||
else if(response.code() == 404) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.apiNotFound));
|
||||
Toasty.warning(ctx, ctx.getString(R.string.apiNotFound));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.genericError));
|
||||
Toasty.error(ctx, ctx.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -146,7 +146,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
|
||||
|
||||
if(response.code() != 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
Toasty.error(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
|
||||
public void onFailure(@NonNull Call<WatchInfo> call, @NonNull Throwable t) {
|
||||
|
||||
tinyDb.putBoolean("repoWatch", false);
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
Toasty.error(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -270,7 +270,7 @@ public class RepoForksAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
||||
|
||||
if(response.code() != 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
Toasty.error(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ public class RepoForksAdapter extends RecyclerView.Adapter<RecyclerView.ViewHold
|
||||
public void onFailure(@NonNull Call<WatchInfo> call, @NonNull Throwable t) {
|
||||
|
||||
tinyDb.putBoolean("repoWatch", false);
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
Toasty.error(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -147,7 +147,7 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
||||
|
||||
if(response.code() != 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
Toasty.error(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
||||
public void onFailure(@NonNull Call<WatchInfo> call, @NonNull Throwable t) {
|
||||
|
||||
tinyDb.putBoolean("repoWatch", false);
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
Toasty.error(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -142,7 +142,7 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
|
||||
|
||||
if(response.code() != 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
Toasty.error(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
|
||||
public void onFailure(@NonNull Call<WatchInfo> call, @NonNull Throwable t) {
|
||||
|
||||
tinyDb.putBoolean("repoWatch", false);
|
||||
Toasty.info(context, context.getString(R.string.genericApiStatusError));
|
||||
Toasty.error(context, context.getString(R.string.genericApiStatusError));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@@ -111,7 +111,7 @@ public class UserAccountsAdapter extends RecyclerView.Adapter<UserAccountsAdapte
|
||||
userAccountsList.remove(position);
|
||||
notifyItemRemoved(position);
|
||||
notifyItemRangeChanged(position, userAccountsList.size());
|
||||
Toasty.info(mCtx, mCtx.getResources().getString(R.string.accountDeletedMessage));
|
||||
Toasty.success(mCtx, mCtx.getResources().getString(R.string.accountDeletedMessage));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user