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:
@@ -47,7 +47,7 @@ public class CollaboratorActions {
|
||||
if(response.isSuccessful()) {
|
||||
if(response.code() == 204) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.removeCollaboratorToastText));
|
||||
Toasty.success(context, context.getString(R.string.removeCollaboratorToastText));
|
||||
((AddCollaboratorToRepositoryActivity)context).finish();
|
||||
//Log.i("addCollaboratorSearch", addCollaboratorSearch.getText().toString());
|
||||
//tinyDb.putBoolean("updateDataSet", true);
|
||||
@@ -66,17 +66,17 @@ public class CollaboratorActions {
|
||||
}
|
||||
else if(response.code() == 403) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.authorizeError));
|
||||
Toasty.error(context, context.getString(R.string.authorizeError));
|
||||
|
||||
}
|
||||
else if(response.code() == 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.apiNotFound));
|
||||
Toasty.warning(context, context.getString(R.string.apiNotFound));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericError));
|
||||
Toasty.error(context, context.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ public class CollaboratorActions {
|
||||
if(response.isSuccessful()) {
|
||||
if(response.code() == 204) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.addCollaboratorToastText));
|
||||
Toasty.success(context, context.getString(R.string.addCollaboratorToastText));
|
||||
((AddCollaboratorToRepositoryActivity)context).finish();
|
||||
//AddCollaboratorToRepositoryActivity usersSearchData = new AddCollaboratorToRepositoryActivity();
|
||||
//usersSearchData.loadUserSearchList(instanceUrl, instanceToken, searchKeyword, context);
|
||||
@@ -134,17 +134,17 @@ public class CollaboratorActions {
|
||||
}
|
||||
else if(response.code() == 403) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.authorizeError));
|
||||
Toasty.error(context, context.getString(R.string.authorizeError));
|
||||
|
||||
}
|
||||
else if(response.code() == 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.apiNotFound));
|
||||
Toasty.warning(context, context.getString(R.string.apiNotFound));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericError));
|
||||
Toasty.error(context, context.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class IssueActions {
|
||||
if(response.code() == 200) {
|
||||
|
||||
tinyDb.putBoolean("commentEdited", true);
|
||||
Toasty.info(ctx, ctx.getString(R.string.editCommentUpdatedText));
|
||||
Toasty.success(ctx, ctx.getString(R.string.editCommentUpdatedText));
|
||||
((ReplyToIssueActivity) ctx).finish();
|
||||
|
||||
}
|
||||
@@ -59,17 +59,17 @@ public class IssueActions {
|
||||
}
|
||||
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));
|
||||
|
||||
}
|
||||
|
||||
@@ -113,13 +113,13 @@ public class IssueActions {
|
||||
|
||||
if(issueState.equals("closed")) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.issueStateClosed));
|
||||
Toasty.success(ctx, ctx.getString(R.string.issueStateClosed));
|
||||
tinyDb.putString("issueState", "closed");
|
||||
|
||||
}
|
||||
else if(issueState.equals("open")) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.issueStateReopened));
|
||||
Toasty.success(ctx, ctx.getString(R.string.issueStateReopened));
|
||||
tinyDb.putString("issueState", "open");
|
||||
|
||||
}
|
||||
@@ -133,17 +133,17 @@ public class IssueActions {
|
||||
}
|
||||
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));
|
||||
|
||||
}
|
||||
|
||||
@@ -184,14 +184,14 @@ public class IssueActions {
|
||||
|
||||
if(response.code() == 201) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.subscribedSuccessfully));
|
||||
Toasty.success(ctx, ctx.getString(R.string.subscribedSuccessfully));
|
||||
tinyDB.putBoolean("issueSubscribed", true);
|
||||
|
||||
}
|
||||
else if(response.code() == 200) {
|
||||
|
||||
tinyDB.putBoolean("issueSubscribed", true);
|
||||
Toasty.info(ctx, ctx.getString(R.string.alreadySubscribed));
|
||||
Toasty.success(ctx, ctx.getString(R.string.alreadySubscribed));
|
||||
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ public class IssueActions {
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.subscriptionError));
|
||||
Toasty.error(ctx, ctx.getString(R.string.subscriptionError));
|
||||
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ public class IssueActions {
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.unsubscribedSuccessfully));
|
||||
Toasty.success(ctx, ctx.getString(R.string.unsubscribedSuccessfully));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -244,14 +244,14 @@ public class IssueActions {
|
||||
|
||||
if(response.code() == 201) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.unsubscribedSuccessfully));
|
||||
Toasty.success(ctx, ctx.getString(R.string.unsubscribedSuccessfully));
|
||||
tinyDB.putBoolean("issueSubscribed", false);
|
||||
|
||||
}
|
||||
else if(response.code() == 200) {
|
||||
|
||||
tinyDB.putBoolean("issueSubscribed", false);
|
||||
Toasty.info(ctx, ctx.getString(R.string.alreadyUnsubscribed));
|
||||
Toasty.success(ctx, ctx.getString(R.string.alreadyUnsubscribed));
|
||||
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ public class IssueActions {
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.unsubscriptionError));
|
||||
Toasty.error(ctx, ctx.getString(R.string.unsubscriptionError));
|
||||
|
||||
}
|
||||
|
||||
@@ -272,7 +272,7 @@ public class IssueActions {
|
||||
@Override
|
||||
public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.unsubscriptionError));
|
||||
Toasty.error(ctx, ctx.getString(R.string.unsubscriptionError));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class MilestoneActions {
|
||||
|
||||
if(response.isSuccessful()) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.milestoneStatusUpdate));
|
||||
Toasty.success(ctx, ctx.getString(R.string.milestoneStatusUpdate));
|
||||
|
||||
}
|
||||
else if(response.code() == 401) {
|
||||
@@ -61,7 +61,7 @@ public class MilestoneActions {
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.genericError));
|
||||
Toasty.error(ctx, ctx.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ public class MilestoneActions {
|
||||
|
||||
if(response.isSuccessful()) {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.milestoneStatusUpdate));
|
||||
Toasty.success(ctx, ctx.getString(R.string.milestoneStatusUpdate));
|
||||
|
||||
}
|
||||
else if(response.code() == 401) {
|
||||
@@ -119,7 +119,7 @@ public class MilestoneActions {
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(ctx, ctx.getString(R.string.genericError));
|
||||
Toasty.error(ctx, ctx.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class RepositoryActions {
|
||||
if(response.code() == 204) {
|
||||
|
||||
tinyDb.putBoolean("repoCreated", true);
|
||||
Toasty.info(context, context.getString(R.string.starRepositorySuccess));
|
||||
Toasty.success(context, context.getString(R.string.starRepositorySuccess));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -60,17 +60,17 @@ public class RepositoryActions {
|
||||
}
|
||||
else if(response.code() == 403) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.authorizeError));
|
||||
Toasty.error(context, context.getString(R.string.authorizeError));
|
||||
|
||||
}
|
||||
else if(response.code() == 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.apiNotFound));
|
||||
Toasty.warning(context, context.getString(R.string.apiNotFound));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericError));
|
||||
Toasty.error(context, context.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class RepositoryActions {
|
||||
if(response.code() == 204) {
|
||||
|
||||
tinyDb.putBoolean("repoCreated", true);
|
||||
Toasty.info(context, context.getString(R.string.unStarRepositorySuccess));
|
||||
Toasty.success(context, context.getString(R.string.unStarRepositorySuccess));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -125,17 +125,17 @@ public class RepositoryActions {
|
||||
}
|
||||
else if(response.code() == 403) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.authorizeError));
|
||||
Toasty.error(context, context.getString(R.string.authorizeError));
|
||||
|
||||
}
|
||||
else if(response.code() == 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.apiNotFound));
|
||||
Toasty.warning(context, context.getString(R.string.apiNotFound));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericError));
|
||||
Toasty.error(context, context.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ public class RepositoryActions {
|
||||
if(response.code() == 200) {
|
||||
|
||||
tinyDb.putBoolean("repoCreated", true);
|
||||
Toasty.info(context, context.getString(R.string.watchRepositorySuccess));
|
||||
Toasty.success(context, context.getString(R.string.watchRepositorySuccess));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -190,17 +190,17 @@ public class RepositoryActions {
|
||||
}
|
||||
else if(response.code() == 403) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.authorizeError));
|
||||
Toasty.error(context, context.getString(R.string.authorizeError));
|
||||
|
||||
}
|
||||
else if(response.code() == 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.apiNotFound));
|
||||
Toasty.warning(context, context.getString(R.string.apiNotFound));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericError));
|
||||
Toasty.error(context, context.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
@@ -240,7 +240,7 @@ public class RepositoryActions {
|
||||
if(response.code() == 204) {
|
||||
|
||||
tinyDb.putBoolean("repoCreated", true);
|
||||
Toasty.info(context, context.getString(R.string.unWatchRepositorySuccess));
|
||||
Toasty.success(context, context.getString(R.string.unWatchRepositorySuccess));
|
||||
|
||||
}
|
||||
else if(response.code() == 401) {
|
||||
@@ -253,17 +253,17 @@ public class RepositoryActions {
|
||||
}
|
||||
else if(response.code() == 403) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.authorizeError));
|
||||
Toasty.error(context, context.getString(R.string.authorizeError));
|
||||
|
||||
}
|
||||
else if(response.code() == 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.apiNotFound));
|
||||
Toasty.warning(context, context.getString(R.string.apiNotFound));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericError));
|
||||
Toasty.error(context, context.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ public class TeamActions {
|
||||
if(response.code() == 204) {
|
||||
|
||||
tinyDb.putBoolean("teamActionFlag", true);
|
||||
Toasty.info(context, context.getString(R.string.memberRemovedMessage));
|
||||
Toasty.success(context, context.getString(R.string.memberRemovedMessage));
|
||||
((AddNewTeamMemberActivity)context).finish();
|
||||
|
||||
}
|
||||
@@ -59,17 +59,17 @@ public class TeamActions {
|
||||
}
|
||||
else if(response.code() == 403) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.authorizeError));
|
||||
Toasty.error(context, context.getString(R.string.authorizeError));
|
||||
|
||||
}
|
||||
else if(response.code() == 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.apiNotFound));
|
||||
Toasty.warning(context, context.getString(R.string.apiNotFound));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericError));
|
||||
Toasty.error(context, context.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ public class TeamActions {
|
||||
if(response.code() == 204) {
|
||||
|
||||
tinyDb.putBoolean("teamActionFlag", true);
|
||||
Toasty.info(context, context.getString(R.string.memberAddedMessage));
|
||||
Toasty.success(context, context.getString(R.string.memberAddedMessage));
|
||||
((AddNewTeamMemberActivity)context).finish();
|
||||
|
||||
}
|
||||
@@ -125,17 +125,17 @@ public class TeamActions {
|
||||
}
|
||||
else if(response.code() == 403) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.authorizeError));
|
||||
Toasty.error(context, context.getString(R.string.authorizeError));
|
||||
|
||||
}
|
||||
else if(response.code() == 404) {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.apiNotFound));
|
||||
Toasty.warning(context, context.getString(R.string.apiNotFound));
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
Toasty.info(context, context.getString(R.string.genericError));
|
||||
Toasty.error(context, context.getString(R.string.genericError));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user