mirror of https://codeberg.org/gitnex/GitNex.git
[New] Delete own comment (#478)
Code Reformat Use return from 6543 commit Fix typo Move delete method to adapter to update the recyclerview make it work add to bottomsheet entry Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/478 Reviewed-by: 6543 <6543@noreply.gitea.io>
This commit is contained in:
parent
5d1efe0f3f
commit
e5d6fd3b41
|
@ -4,6 +4,7 @@ import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.activities.ReplyToIssueActivity;
|
import org.mian.gitnex.activities.ReplyToIssueActivity;
|
||||||
|
@ -11,10 +12,9 @@ import org.mian.gitnex.clients.RetrofitClient;
|
||||||
import org.mian.gitnex.helpers.AlertDialogs;
|
import org.mian.gitnex.helpers.AlertDialogs;
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
import org.mian.gitnex.models.UpdateIssueState;
|
|
||||||
import org.mian.gitnex.models.IssueComments;
|
import org.mian.gitnex.models.IssueComments;
|
||||||
|
import org.mian.gitnex.models.UpdateIssueState;
|
||||||
import org.mian.gitnex.util.TinyDB;
|
import org.mian.gitnex.util.TinyDB;
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
|
|
||||||
|
@ -38,10 +38,7 @@ public class IssueActions {
|
||||||
IssueComments commentBodyJson = new IssueComments(commentBody);
|
IssueComments commentBodyJson = new IssueComments(commentBody);
|
||||||
Call<IssueComments> call;
|
Call<IssueComments> call;
|
||||||
|
|
||||||
call = RetrofitClient
|
call = RetrofitClient.getInstance(instanceUrl, ctx).getApiInterface().patchIssueComment(Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, commentId, commentBodyJson);
|
||||||
.getInstance(instanceUrl, ctx)
|
|
||||||
.getApiInterface()
|
|
||||||
.patchIssueComment(Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, commentId, commentBodyJson);
|
|
||||||
|
|
||||||
call.enqueue(new Callback<IssueComments>() {
|
call.enqueue(new Callback<IssueComments>() {
|
||||||
|
|
||||||
|
@ -53,16 +50,13 @@ public class IssueActions {
|
||||||
|
|
||||||
tinyDb.putBoolean("commentEdited", true);
|
tinyDb.putBoolean("commentEdited", true);
|
||||||
Toasty.info(ctx, ctx.getString(R.string.editCommentUpdatedText));
|
Toasty.info(ctx, ctx.getString(R.string.editCommentUpdatedText));
|
||||||
((ReplyToIssueActivity)ctx).finish();
|
((ReplyToIssueActivity) ctx).finish();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(response.code() == 401) {
|
else if(response.code() == 401) {
|
||||||
|
|
||||||
AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle),
|
AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle), ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage), ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton), ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage),
|
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton),
|
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(response.code() == 403) {
|
else if(response.code() == 403) {
|
||||||
|
@ -85,6 +79,7 @@ public class IssueActions {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<IssueComments> call, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<IssueComments> call, @NonNull Throwable t) {
|
||||||
|
|
||||||
Log.e("onFailure", t.toString());
|
Log.e("onFailure", t.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -105,10 +100,7 @@ public class IssueActions {
|
||||||
UpdateIssueState issueStatJson = new UpdateIssueState(issueState);
|
UpdateIssueState issueStatJson = new UpdateIssueState(issueState);
|
||||||
Call<JsonElement> call;
|
Call<JsonElement> call;
|
||||||
|
|
||||||
call = RetrofitClient
|
call = RetrofitClient.getInstance(instanceUrl, ctx).getApiInterface().closeReopenIssue(Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex, issueStatJson);
|
||||||
.getInstance(instanceUrl, ctx)
|
|
||||||
.getApiInterface()
|
|
||||||
.closeReopenIssue(Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex, issueStatJson);
|
|
||||||
|
|
||||||
call.enqueue(new Callback<JsonElement>() {
|
call.enqueue(new Callback<JsonElement>() {
|
||||||
|
|
||||||
|
@ -138,10 +130,7 @@ public class IssueActions {
|
||||||
}
|
}
|
||||||
else if(response.code() == 401) {
|
else if(response.code() == 401) {
|
||||||
|
|
||||||
AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle),
|
AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle), ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage), ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton), ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage),
|
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton),
|
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(response.code() == 403) {
|
else if(response.code() == 403) {
|
||||||
|
@ -164,6 +153,7 @@ public class IssueActions {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<JsonElement> call, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<JsonElement> call, @NonNull Throwable t) {
|
||||||
|
|
||||||
Log.e("onFailure", t.toString());
|
Log.e("onFailure", t.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -186,10 +176,7 @@ public class IssueActions {
|
||||||
|
|
||||||
Call<Void> call;
|
Call<Void> call;
|
||||||
|
|
||||||
call = RetrofitClient
|
call = RetrofitClient.getInstance(instanceUrl, ctx).getApiInterface().addIssueSubscriber(token, repoOwner, repoName, issueNr, userLogin);
|
||||||
.getInstance(instanceUrl, ctx)
|
|
||||||
.getApiInterface()
|
|
||||||
.addIssueSubscriber(token, repoOwner, repoName, issueNr, userLogin);
|
|
||||||
|
|
||||||
call.enqueue(new Callback<Void>() {
|
call.enqueue(new Callback<Void>() {
|
||||||
|
|
||||||
|
@ -210,10 +197,7 @@ public class IssueActions {
|
||||||
}
|
}
|
||||||
else if(response.code() == 401) {
|
else if(response.code() == 401) {
|
||||||
|
|
||||||
AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle),
|
AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle), ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage), ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton), ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage),
|
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton),
|
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -226,6 +210,7 @@ public class IssueActions {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {
|
||||||
|
|
||||||
Toasty.info(ctx, ctx.getString(R.string.issueSubscribtionError));
|
Toasty.info(ctx, ctx.getString(R.string.issueSubscribtionError));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -248,10 +233,7 @@ public class IssueActions {
|
||||||
|
|
||||||
Call<Void> call;
|
Call<Void> call;
|
||||||
|
|
||||||
call = RetrofitClient
|
call = RetrofitClient.getInstance(instanceUrl, ctx).getApiInterface().delIssueSubscriber(token, repoOwner, repoName, issueNr, userLogin);
|
||||||
.getInstance(instanceUrl, ctx)
|
|
||||||
.getApiInterface()
|
|
||||||
.delIssueSubscriber(token, repoOwner, repoName, issueNr, userLogin);
|
|
||||||
|
|
||||||
call.enqueue(new Callback<Void>() {
|
call.enqueue(new Callback<Void>() {
|
||||||
|
|
||||||
|
@ -272,10 +254,7 @@ public class IssueActions {
|
||||||
}
|
}
|
||||||
else if(response.code() == 401) {
|
else if(response.code() == 401) {
|
||||||
|
|
||||||
AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle),
|
AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle), ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage), ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton), ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage),
|
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton),
|
|
||||||
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -288,6 +267,7 @@ public class IssueActions {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<Void> call, @NonNull Throwable t) {
|
||||||
|
|
||||||
Toasty.info(ctx, ctx.getString(R.string.issueUnsubscribtionError));
|
Toasty.info(ctx, ctx.getString(R.string.issueUnsubscribtionError));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,32 +1,5 @@
|
||||||
package org.mian.gitnex.activities;
|
package org.mian.gitnex.activities;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.appcompat.widget.Toolbar;
|
|
||||||
import androidx.lifecycle.Observer;
|
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
|
||||||
import io.noties.markwon.AbstractMarkwonPlugin;
|
|
||||||
import io.noties.markwon.Markwon;
|
|
||||||
import io.noties.markwon.core.CorePlugin;
|
|
||||||
import io.noties.markwon.core.MarkwonTheme;
|
|
||||||
import io.noties.markwon.ext.strikethrough.StrikethroughPlugin;
|
|
||||||
import io.noties.markwon.ext.tables.TablePlugin;
|
|
||||||
import io.noties.markwon.ext.tasklist.TaskListPlugin;
|
|
||||||
import io.noties.markwon.html.HtmlPlugin;
|
|
||||||
import io.noties.markwon.image.DefaultMediaDecoder;
|
|
||||||
import io.noties.markwon.image.ImageItem;
|
|
||||||
import io.noties.markwon.image.ImagesPlugin;
|
|
||||||
import io.noties.markwon.image.SchemeHandler;
|
|
||||||
import io.noties.markwon.image.gif.GifMediaDecoder;
|
|
||||||
import io.noties.markwon.image.svg.SvgMediaDecoder;
|
|
||||||
import io.noties.markwon.linkify.LinkifyPlugin;
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.Callback;
|
|
||||||
import retrofit2.Response;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
|
@ -50,6 +23,15 @@ import android.widget.LinearLayout;
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.ScrollView;
|
import android.widget.ScrollView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.appcompat.widget.Toolbar;
|
||||||
|
import androidx.lifecycle.Observer;
|
||||||
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
import com.amulyakhare.textdrawable.TextDrawable;
|
import com.amulyakhare.textdrawable.TextDrawable;
|
||||||
import com.vdurmont.emoji.EmojiParser;
|
import com.vdurmont.emoji.EmojiParser;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
|
@ -59,15 +41,15 @@ import org.mian.gitnex.clients.RetrofitClient;
|
||||||
import org.mian.gitnex.fragments.BottomSheetSingleIssueFragment;
|
import org.mian.gitnex.fragments.BottomSheetSingleIssueFragment;
|
||||||
import org.mian.gitnex.helpers.AlertDialogs;
|
import org.mian.gitnex.helpers.AlertDialogs;
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
|
import org.mian.gitnex.helpers.ClickListener;
|
||||||
|
import org.mian.gitnex.helpers.ColorInverter;
|
||||||
import org.mian.gitnex.helpers.LabelWidthCalculator;
|
import org.mian.gitnex.helpers.LabelWidthCalculator;
|
||||||
|
import org.mian.gitnex.helpers.RoundedTransformation;
|
||||||
import org.mian.gitnex.helpers.TimeHelper;
|
import org.mian.gitnex.helpers.TimeHelper;
|
||||||
import org.mian.gitnex.helpers.UserMentions;
|
import org.mian.gitnex.helpers.UserMentions;
|
||||||
import org.mian.gitnex.models.IssueComments;
|
import org.mian.gitnex.models.IssueComments;
|
||||||
import org.mian.gitnex.models.Issues;
|
import org.mian.gitnex.models.Issues;
|
||||||
import org.mian.gitnex.helpers.ColorInverter;
|
|
||||||
import org.mian.gitnex.helpers.RoundedTransformation;
|
|
||||||
import org.mian.gitnex.util.TinyDB;
|
import org.mian.gitnex.util.TinyDB;
|
||||||
import org.mian.gitnex.helpers.ClickListener;
|
|
||||||
import org.mian.gitnex.viewmodels.IssueCommentsViewModel;
|
import org.mian.gitnex.viewmodels.IssueCommentsViewModel;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
|
@ -76,6 +58,24 @@ import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import io.noties.markwon.AbstractMarkwonPlugin;
|
||||||
|
import io.noties.markwon.Markwon;
|
||||||
|
import io.noties.markwon.core.CorePlugin;
|
||||||
|
import io.noties.markwon.core.MarkwonTheme;
|
||||||
|
import io.noties.markwon.ext.strikethrough.StrikethroughPlugin;
|
||||||
|
import io.noties.markwon.ext.tables.TablePlugin;
|
||||||
|
import io.noties.markwon.ext.tasklist.TaskListPlugin;
|
||||||
|
import io.noties.markwon.html.HtmlPlugin;
|
||||||
|
import io.noties.markwon.image.DefaultMediaDecoder;
|
||||||
|
import io.noties.markwon.image.ImageItem;
|
||||||
|
import io.noties.markwon.image.ImagesPlugin;
|
||||||
|
import io.noties.markwon.image.SchemeHandler;
|
||||||
|
import io.noties.markwon.image.gif.GifMediaDecoder;
|
||||||
|
import io.noties.markwon.image.svg.SvgMediaDecoder;
|
||||||
|
import io.noties.markwon.linkify.LinkifyPlugin;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
|
@ -103,7 +103,8 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
private LinearLayout assigneesLayout;
|
private LinearLayout assigneesLayout;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getLayoutResourceId(){
|
protected int getLayoutResourceId() {
|
||||||
|
|
||||||
return R.layout.activity_issue_detail;
|
return R.layout.activity_issue_detail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,18 +162,18 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
|
|
||||||
scrollViewComments.setOnScrollChangeListener((v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
|
scrollViewComments.setOnScrollChangeListener((v, scrollX, scrollY, oldScrollX, oldScrollY) -> {
|
||||||
|
|
||||||
if ((scrollY - oldScrollY) > 0 && createNewComment.isShown()) {
|
if((scrollY - oldScrollY) > 0 && createNewComment.isShown()) {
|
||||||
createNewComment.setVisibility(View.GONE);
|
createNewComment.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else if ((scrollY - oldScrollY) < 0) {
|
else if((scrollY - oldScrollY) < 0) {
|
||||||
createNewComment.setVisibility(View.VISIBLE);
|
createNewComment.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!scrollViewComments.canScrollVertically(1)) { // bottom
|
if(!scrollViewComments.canScrollVertically(1)) { // bottom
|
||||||
createNewComment.setVisibility(View.GONE);
|
createNewComment.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!scrollViewComments.canScrollVertically(-1)) { // top
|
if(!scrollViewComments.canScrollVertically(-1)) { // top
|
||||||
createNewComment.setVisibility(View.VISIBLE);
|
createNewComment.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,6 +216,7 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
|
||||||
MenuInflater inflater = getMenuInflater();
|
MenuInflater inflater = getMenuInflater();
|
||||||
inflater.inflate(R.menu.generic_nav_dotted_menu, menu);
|
inflater.inflate(R.menu.generic_nav_dotted_menu, menu);
|
||||||
return true;
|
return true;
|
||||||
|
@ -225,7 +227,7 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
|
|
||||||
int id = item.getItemId();
|
int id = item.getItemId();
|
||||||
|
|
||||||
switch (id) {
|
switch(id) {
|
||||||
case android.R.id.home:
|
case android.R.id.home:
|
||||||
finish();
|
finish();
|
||||||
return true;
|
return true;
|
||||||
|
@ -241,6 +243,7 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResume() {
|
public void onResume() {
|
||||||
|
|
||||||
super.onResume();
|
super.onResume();
|
||||||
final TinyDB tinyDb = new TinyDB(appCtx);
|
final TinyDB tinyDb = new TinyDB(appCtx);
|
||||||
final String instanceUrl = tinyDb.getString("instanceUrl");
|
final String instanceUrl = tinyDb.getString("instanceUrl");
|
||||||
|
@ -254,13 +257,17 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
|
|
||||||
if(tinyDb.getBoolean("commentPosted")) {
|
if(tinyDb.getBoolean("commentPosted")) {
|
||||||
scrollViewComments.post(new Runnable() {
|
scrollViewComments.post(new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
IssueCommentsViewModel.loadIssueComments(instanceUrl, Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex, ctx);
|
IssueCommentsViewModel.loadIssueComments(instanceUrl, Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex, ctx);
|
||||||
|
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
scrollViewComments.fullScroll(ScrollView.FOCUS_DOWN);
|
scrollViewComments.fullScroll(ScrollView.FOCUS_DOWN);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
@ -272,8 +279,10 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
|
|
||||||
if(tinyDb.getBoolean("commentEdited")) {
|
if(tinyDb.getBoolean("commentEdited")) {
|
||||||
scrollViewComments.post(new Runnable() {
|
scrollViewComments.post(new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
IssueCommentsViewModel.loadIssueComments(instanceUrl, Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex, ctx);
|
IssueCommentsViewModel.loadIssueComments(instanceUrl, Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex, ctx);
|
||||||
tinyDb.putBoolean("commentEdited", false);
|
tinyDb.putBoolean("commentEdited", false);
|
||||||
}
|
}
|
||||||
|
@ -283,8 +292,10 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
if(tinyDb.getBoolean("singleIssueUpdate")) {
|
if(tinyDb.getBoolean("singleIssueUpdate")) {
|
||||||
|
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
assigneesLayout.removeAllViews();
|
assigneesLayout.removeAllViews();
|
||||||
labelsLayout.removeAllViews();
|
labelsLayout.removeAllViews();
|
||||||
getSingleIssue(instanceUrl, instanceToken, repoOwner, repoName, issueIndex, loginUid);
|
getSingleIssue(instanceUrl, instanceToken, repoOwner, repoName, issueIndex, loginUid);
|
||||||
|
@ -297,8 +308,10 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
if(tinyDb.getBoolean("issueEdited")) {
|
if(tinyDb.getBoolean("issueEdited")) {
|
||||||
|
|
||||||
new Handler().postDelayed(new Runnable() {
|
new Handler().postDelayed(new Runnable() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
assigneesLayout.removeAllViews();
|
assigneesLayout.removeAllViews();
|
||||||
labelsLayout.removeAllViews();
|
labelsLayout.removeAllViews();
|
||||||
getSingleIssue(instanceUrl, instanceToken, repoOwner, repoName, issueIndex, loginUid);
|
getSingleIssue(instanceUrl, instanceToken, repoOwner, repoName, issueIndex, loginUid);
|
||||||
|
@ -315,8 +328,10 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
IssueCommentsViewModel issueCommentsModel = new ViewModelProvider(this).get(IssueCommentsViewModel.class);
|
IssueCommentsViewModel issueCommentsModel = new ViewModelProvider(this).get(IssueCommentsViewModel.class);
|
||||||
|
|
||||||
issueCommentsModel.getIssueCommentList(instanceUrl, Authorization.returnAuthentication(ctx, loginUid, instanceToken), owner, repo, index, ctx).observe(this, new Observer<List<IssueComments>>() {
|
issueCommentsModel.getIssueCommentList(instanceUrl, Authorization.returnAuthentication(ctx, loginUid, instanceToken), owner, repo, index, ctx).observe(this, new Observer<List<IssueComments>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChanged(@Nullable List<IssueComments> issueCommentsMain) {
|
public void onChanged(@Nullable List<IssueComments> issueCommentsMain) {
|
||||||
|
|
||||||
adapter = new IssueCommentsAdapter(ctx, issueCommentsMain);
|
adapter = new IssueCommentsAdapter(ctx, issueCommentsMain);
|
||||||
mRecyclerView.setAdapter(adapter);
|
mRecyclerView.setAdapter(adapter);
|
||||||
}
|
}
|
||||||
|
@ -327,34 +342,27 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
private void getSingleIssue(String instanceUrl, String instanceToken, String repoOwner, String repoName, int issueIndex, String loginUid) {
|
private void getSingleIssue(String instanceUrl, String instanceToken, String repoOwner, String repoName, int issueIndex, String loginUid) {
|
||||||
|
|
||||||
final TinyDB tinyDb = new TinyDB(appCtx);
|
final TinyDB tinyDb = new TinyDB(appCtx);
|
||||||
Call<Issues> call = RetrofitClient
|
Call<Issues> call = RetrofitClient.getInstance(instanceUrl, ctx).getApiInterface().getIssueByIndex(Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex);
|
||||||
.getInstance(instanceUrl, ctx)
|
|
||||||
.getApiInterface()
|
|
||||||
.getIssueByIndex(Authorization.returnAuthentication(ctx, loginUid, instanceToken), repoOwner, repoName, issueIndex);
|
|
||||||
|
|
||||||
call.enqueue(new Callback<Issues>() {
|
call.enqueue(new Callback<Issues>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull Call<Issues> call, @NonNull Response<Issues> response) {
|
public void onResponse(@NonNull Call<Issues> call, @NonNull Response<Issues> response) {
|
||||||
|
|
||||||
if (response.isSuccessful()) {
|
if(response.isSuccessful()) {
|
||||||
if (response.code() == 200) {
|
if(response.code() == 200) {
|
||||||
|
|
||||||
Issues singleIssue = response.body();
|
Issues singleIssue = response.body();
|
||||||
assert singleIssue != null;
|
assert singleIssue != null;
|
||||||
|
|
||||||
final Markwon markwon = Markwon.builder(Objects.requireNonNull(ctx))
|
final Markwon markwon = Markwon.builder(Objects.requireNonNull(ctx)).usePlugin(CorePlugin.create()).usePlugin(ImagesPlugin.create(plugin -> {
|
||||||
.usePlugin(CorePlugin.create())
|
|
||||||
.usePlugin(ImagesPlugin.create(plugin -> {
|
|
||||||
plugin.addSchemeHandler(new SchemeHandler() {
|
plugin.addSchemeHandler(new SchemeHandler() {
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public ImageItem handle(@NonNull String raw, @NonNull Uri uri) {
|
public ImageItem handle(@NonNull String raw, @NonNull Uri uri) {
|
||||||
|
|
||||||
final int resourceId = ctx.getResources().getIdentifier(
|
final int resourceId = ctx.getResources().getIdentifier(raw.substring("drawable://".length()), "drawable", ctx.getPackageName());
|
||||||
raw.substring("drawable://".length()),
|
|
||||||
"drawable",
|
|
||||||
ctx.getPackageName());
|
|
||||||
|
|
||||||
final Drawable drawable = ctx.getDrawable(resourceId);
|
final Drawable drawable = ctx.getDrawable(resourceId);
|
||||||
|
|
||||||
|
@ -365,6 +373,7 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Collection<String> supportedSchemes() {
|
public Collection<String> supportedSchemes() {
|
||||||
|
|
||||||
return Collections.singleton("drawable");
|
return Collections.singleton("drawable");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -375,22 +384,14 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
plugin.defaultMediaDecoder(DefaultMediaDecoder.create(ctx.getResources()));
|
plugin.defaultMediaDecoder(DefaultMediaDecoder.create(ctx.getResources()));
|
||||||
plugin.defaultMediaDecoder(DefaultMediaDecoder.create());
|
plugin.defaultMediaDecoder(DefaultMediaDecoder.create());
|
||||||
|
|
||||||
}))
|
})).usePlugin(new AbstractMarkwonPlugin() {
|
||||||
.usePlugin(new AbstractMarkwonPlugin() {
|
|
||||||
@Override
|
@Override
|
||||||
public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
|
public void configureTheme(@NonNull MarkwonTheme.Builder builder) {
|
||||||
builder
|
|
||||||
.codeTextColor(tinyDb.getInt("codeBlockColor"))
|
builder.codeTextColor(tinyDb.getInt("codeBlockColor")).codeBackgroundColor(tinyDb.getInt("codeBlockBackground")).linkColor(getResources().getColor(R.color.lightBlue));
|
||||||
.codeBackgroundColor(tinyDb.getInt("codeBlockBackground"))
|
|
||||||
.linkColor(getResources().getColor(R.color.lightBlue));
|
|
||||||
}
|
}
|
||||||
})
|
}).usePlugin(TablePlugin.create(ctx)).usePlugin(TaskListPlugin.create(ctx)).usePlugin(HtmlPlugin.create()).usePlugin(StrikethroughPlugin.create()).usePlugin(LinkifyPlugin.create()).build();
|
||||||
.usePlugin(TablePlugin.create(ctx))
|
|
||||||
.usePlugin(TaskListPlugin.create(ctx))
|
|
||||||
.usePlugin(HtmlPlugin.create())
|
|
||||||
.usePlugin(StrikethroughPlugin.create())
|
|
||||||
.usePlugin(LinkifyPlugin.create())
|
|
||||||
.build();
|
|
||||||
|
|
||||||
TinyDB tinyDb = new TinyDB(appCtx);
|
TinyDB tinyDb = new TinyDB(appCtx);
|
||||||
final String locale = tinyDb.getString("locale");
|
final String locale = tinyDb.getString("locale");
|
||||||
|
@ -399,21 +400,20 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
tinyDb.putString("issueTitle", singleIssue.getTitle());
|
tinyDb.putString("issueTitle", singleIssue.getTitle());
|
||||||
|
|
||||||
PicassoService.getInstance(ctx).get().load(singleIssue.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(assigneeAvatar);
|
PicassoService.getInstance(ctx).get().load(singleIssue.getUser().getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(8, 0)).resize(120, 120).centerCrop().into(assigneeAvatar);
|
||||||
String issueNumber_ = "<font color='" + appCtx.getResources().getColor(R.color.lightGray) + "'>" + appCtx.getResources().getString(R.string.hash) + singleIssue.getNumber() +
|
String issueNumber_ = "<font color='" + appCtx.getResources().getColor(R.color.lightGray) + "'>" + appCtx.getResources().getString(R.string.hash) + singleIssue.getNumber() + "</font>";
|
||||||
"</font>";
|
|
||||||
issueTitle.setText(Html.fromHtml(issueNumber_ + " " + singleIssue.getTitle()));
|
issueTitle.setText(Html.fromHtml(issueNumber_ + " " + singleIssue.getTitle()));
|
||||||
String cleanIssueDescription = singleIssue.getBody().trim();
|
String cleanIssueDescription = singleIssue.getBody().trim();
|
||||||
Spanned bodyWithMD = markwon.toMarkdown(EmojiParser.parseToUnicode(cleanIssueDescription));
|
Spanned bodyWithMD = markwon.toMarkdown(EmojiParser.parseToUnicode(cleanIssueDescription));
|
||||||
markwon.setParsedMarkdown(issueDescription, UserMentions.UserMentionsFunc(ctx, bodyWithMD, cleanIssueDescription));
|
markwon.setParsedMarkdown(issueDescription, UserMentions.UserMentionsFunc(ctx, bodyWithMD, cleanIssueDescription));
|
||||||
|
|
||||||
RelativeLayout.LayoutParams paramsDesc = (RelativeLayout.LayoutParams)issueDescription.getLayoutParams();
|
RelativeLayout.LayoutParams paramsDesc = (RelativeLayout.LayoutParams) issueDescription.getLayoutParams();
|
||||||
|
|
||||||
LinearLayout.LayoutParams params1 = new LinearLayout.LayoutParams(80, 80);
|
LinearLayout.LayoutParams params1 = new LinearLayout.LayoutParams(80, 80);
|
||||||
params1.setMargins(15, 0, 0, 0);
|
params1.setMargins(15, 0, 0, 0);
|
||||||
|
|
||||||
if(singleIssue.getAssignees() != null) {
|
if(singleIssue.getAssignees() != null) {
|
||||||
assigneesScrollView.setVisibility(View.VISIBLE);
|
assigneesScrollView.setVisibility(View.VISIBLE);
|
||||||
for (int i = 0; i < singleIssue.getAssignees().size(); i++) {
|
for(int i = 0; i < singleIssue.getAssignees().size(); i++) {
|
||||||
|
|
||||||
ImageView assigneesView = new ImageView(ctx);
|
ImageView assigneesView = new ImageView(ctx);
|
||||||
|
|
||||||
|
@ -421,9 +421,10 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
|
|
||||||
assigneesLayout.addView(assigneesView);
|
assigneesLayout.addView(assigneesView);
|
||||||
assigneesView.setLayoutParams(params1);
|
assigneesView.setLayoutParams(params1);
|
||||||
if (!singleIssue.getAssignees().get(i).getFull_name().equals("")) {
|
if(!singleIssue.getAssignees().get(i).getFull_name().equals("")) {
|
||||||
assigneesView.setOnClickListener(new ClickListener(getString(R.string.assignedTo, singleIssue.getAssignees().get(i).getFull_name()), ctx));
|
assigneesView.setOnClickListener(new ClickListener(getString(R.string.assignedTo, singleIssue.getAssignees().get(i).getFull_name()), ctx));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
assigneesView.setOnClickListener(new ClickListener(getString(R.string.assignedTo, singleIssue.getAssignees().get(i).getLogin()), ctx));
|
assigneesView.setOnClickListener(new ClickListener(getString(R.string.assignedTo, singleIssue.getAssignees().get(i).getLogin()), ctx));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,7 +440,7 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
if(singleIssue.getLabels() != null) {
|
if(singleIssue.getLabels() != null) {
|
||||||
labelsScrollView.setVisibility(View.VISIBLE);
|
labelsScrollView.setVisibility(View.VISIBLE);
|
||||||
int width = 25;
|
int width = 25;
|
||||||
for (int i = 0; i < singleIssue.getLabels().size(); i++) {
|
for(int i = 0; i < singleIssue.getLabels().size(); i++) {
|
||||||
|
|
||||||
String labelColor = singleIssue.getLabels().get(i).getColor();
|
String labelColor = singleIssue.getLabels().get(i).getColor();
|
||||||
String labelName = singleIssue.getLabels().get(i).getName();
|
String labelName = singleIssue.getLabels().get(i).getName();
|
||||||
|
@ -450,15 +451,7 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
labelsLayout.setGravity(Gravity.START | Gravity.TOP);
|
labelsLayout.setGravity(Gravity.START | Gravity.TOP);
|
||||||
labelsView.setLayoutParams(params);
|
labelsView.setLayoutParams(params);
|
||||||
|
|
||||||
TextDrawable drawable = TextDrawable.builder()
|
TextDrawable drawable = TextDrawable.builder().beginConfig().useFont(Typeface.DEFAULT).textColor(new ColorInverter().getContrastColor(color)).fontSize(30).width(LabelWidthCalculator.calculateLabelWidth(labelName, Typeface.DEFAULT, 30, 15)).height(50).endConfig().buildRoundRect(labelName, color, 10);
|
||||||
.beginConfig()
|
|
||||||
.useFont(Typeface.DEFAULT)
|
|
||||||
.textColor(new ColorInverter().getContrastColor(color))
|
|
||||||
.fontSize(30)
|
|
||||||
.width(LabelWidthCalculator.calculateLabelWidth(labelName, Typeface.DEFAULT, 30, 15))
|
|
||||||
.height(50)
|
|
||||||
.endConfig()
|
|
||||||
.buildRoundRect(labelName, color, 10);
|
|
||||||
labelsView.setImageDrawable(drawable);
|
labelsView.setImageDrawable(drawable);
|
||||||
|
|
||||||
labelsLayout.addView(labelsView);
|
labelsLayout.addView(labelsView);
|
||||||
|
@ -471,12 +464,13 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
|
|
||||||
if(singleIssue.getDue_date() != null) {
|
if(singleIssue.getDue_date() != null) {
|
||||||
|
|
||||||
if (timeFormat.equals("normal") || timeFormat.equals("pretty")) {
|
if(timeFormat.equals("normal") || timeFormat.equals("pretty")) {
|
||||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd", new Locale(locale));
|
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd", new Locale(locale));
|
||||||
String dueDate = formatter.format(singleIssue.getDue_date());
|
String dueDate = formatter.format(singleIssue.getDue_date());
|
||||||
issueDueDate.setText(getString(R.string.dueDate, dueDate));
|
issueDueDate.setText(getString(R.string.dueDate, dueDate));
|
||||||
issueDueDate.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(singleIssue.getDue_date()), ctx));
|
issueDueDate.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(singleIssue.getDue_date()), ctx));
|
||||||
} else if (timeFormat.equals("normal1")) {
|
}
|
||||||
|
else if(timeFormat.equals("normal1")) {
|
||||||
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy", new Locale(locale));
|
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy", new Locale(locale));
|
||||||
String dueDate = formatter.format(singleIssue.getDue_date());
|
String dueDate = formatter.format(singleIssue.getDue_date());
|
||||||
issueDueDate.setText(getString(R.string.dueDate, dueDate));
|
issueDueDate.setText(getString(R.string.dueDate, dueDate));
|
||||||
|
@ -531,9 +525,10 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
issueMilestone.setVisibility(View.GONE);
|
issueMilestone.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!singleIssue.getUser().getFull_name().equals("")) {
|
if(!singleIssue.getUser().getFull_name().equals("")) {
|
||||||
assigneeAvatar.setOnClickListener(new ClickListener(ctx.getResources().getString(R.string.issueCreator) + singleIssue.getUser().getFull_name(), ctx));
|
assigneeAvatar.setOnClickListener(new ClickListener(ctx.getResources().getString(R.string.issueCreator) + singleIssue.getUser().getFull_name(), ctx));
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
assigneeAvatar.setOnClickListener(new ClickListener(ctx.getResources().getString(R.string.issueCreator) + singleIssue.getUser().getLogin(), ctx));
|
assigneeAvatar.setOnClickListener(new ClickListener(ctx.getResources().getString(R.string.issueCreator) + singleIssue.getUser().getLogin(), ctx));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -542,10 +537,7 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
}
|
}
|
||||||
else if(response.code() == 401) {
|
else if(response.code() == 401) {
|
||||||
|
|
||||||
AlertDialogs.authorizationTokenRevokedDialog(ctx, getResources().getString(R.string.alertDialogTokenRevokedTitle),
|
AlertDialogs.authorizationTokenRevokedDialog(ctx, getResources().getString(R.string.alertDialogTokenRevokedTitle), getResources().getString(R.string.alertDialogTokenRevokedMessage), getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton), getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
||||||
getResources().getString(R.string.alertDialogTokenRevokedMessage),
|
|
||||||
getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton),
|
|
||||||
getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,6 +545,7 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<Issues> call, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<Issues> call, @NonNull Throwable t) {
|
||||||
|
|
||||||
Log.e("onFailure", t.toString());
|
Log.e("onFailure", t.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -560,6 +553,7 @@ public class IssueDetailActivity extends BaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initCloseListener() {
|
private void initCloseListener() {
|
||||||
|
|
||||||
View.OnClickListener onClickListener = view -> finish();
|
View.OnClickListener onClickListener = view -> finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,29 +11,28 @@ import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
import com.vdurmont.emoji.EmojiParser;
|
import com.vdurmont.emoji.EmojiParser;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.activities.ReplyToIssueActivity;
|
import org.mian.gitnex.activities.ReplyToIssueActivity;
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
import org.mian.gitnex.clients.PicassoService;
|
||||||
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import org.mian.gitnex.helpers.AlertDialogs;
|
||||||
|
import org.mian.gitnex.helpers.ClickListener;
|
||||||
|
import org.mian.gitnex.helpers.RoundedTransformation;
|
||||||
import org.mian.gitnex.helpers.TimeHelper;
|
import org.mian.gitnex.helpers.TimeHelper;
|
||||||
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
import org.mian.gitnex.helpers.UserMentions;
|
import org.mian.gitnex.helpers.UserMentions;
|
||||||
import org.mian.gitnex.models.IssueComments;
|
import org.mian.gitnex.models.IssueComments;
|
||||||
import org.mian.gitnex.helpers.RoundedTransformation;
|
|
||||||
import org.mian.gitnex.util.TinyDB;
|
import org.mian.gitnex.util.TinyDB;
|
||||||
import org.mian.gitnex.helpers.ClickListener;
|
|
||||||
import org.ocpsoft.prettytime.PrettyTime;
|
|
||||||
import java.sql.Time;
|
|
||||||
import java.text.DateFormat;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
|
||||||
import io.noties.markwon.AbstractMarkwonPlugin;
|
import io.noties.markwon.AbstractMarkwonPlugin;
|
||||||
import io.noties.markwon.Markwon;
|
import io.noties.markwon.Markwon;
|
||||||
import io.noties.markwon.core.CorePlugin;
|
import io.noties.markwon.core.CorePlugin;
|
||||||
|
@ -42,7 +41,6 @@ import io.noties.markwon.ext.strikethrough.StrikethroughPlugin;
|
||||||
import io.noties.markwon.ext.tables.TablePlugin;
|
import io.noties.markwon.ext.tables.TablePlugin;
|
||||||
import io.noties.markwon.ext.tasklist.TaskListPlugin;
|
import io.noties.markwon.ext.tasklist.TaskListPlugin;
|
||||||
import io.noties.markwon.html.HtmlPlugin;
|
import io.noties.markwon.html.HtmlPlugin;
|
||||||
import io.noties.markwon.image.AsyncDrawable;
|
|
||||||
import io.noties.markwon.image.DefaultMediaDecoder;
|
import io.noties.markwon.image.DefaultMediaDecoder;
|
||||||
import io.noties.markwon.image.ImageItem;
|
import io.noties.markwon.image.ImageItem;
|
||||||
import io.noties.markwon.image.ImagesPlugin;
|
import io.noties.markwon.image.ImagesPlugin;
|
||||||
|
@ -50,6 +48,8 @@ import io.noties.markwon.image.SchemeHandler;
|
||||||
import io.noties.markwon.image.gif.GifMediaDecoder;
|
import io.noties.markwon.image.gif.GifMediaDecoder;
|
||||||
import io.noties.markwon.image.svg.SvgMediaDecoder;
|
import io.noties.markwon.image.svg.SvgMediaDecoder;
|
||||||
import io.noties.markwon.linkify.LinkifyPlugin;
|
import io.noties.markwon.linkify.LinkifyPlugin;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
|
@ -60,14 +60,20 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
|
||||||
private List<IssueComments> issuesComments;
|
private List<IssueComments> issuesComments;
|
||||||
private Context mCtx;
|
private Context mCtx;
|
||||||
|
|
||||||
static class IssueCommentViewHolder extends RecyclerView.ViewHolder {
|
public IssueCommentsAdapter(Context mCtx, List<IssueComments> issuesCommentsMain) {
|
||||||
|
|
||||||
|
this.mCtx = mCtx;
|
||||||
|
this.issuesComments = issuesCommentsMain;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
class IssueCommentViewHolder extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
private TextView issueNumber;
|
private TextView issueNumber;
|
||||||
private TextView commendId;
|
private TextView commendId;
|
||||||
private ImageView issueCommenterAvatar;
|
private ImageView issueCommenterAvatar;
|
||||||
private TextView issueComment;
|
private TextView issueComment;
|
||||||
private TextView issueCommentDate;
|
private TextView issueCommentDate;
|
||||||
private ImageView commentsOptionsMenu;
|
|
||||||
private TextView commendBodyRaw;
|
private TextView commendBodyRaw;
|
||||||
private TextView commentModified;
|
private TextView commentModified;
|
||||||
private TextView commenterUsername;
|
private TextView commenterUsername;
|
||||||
|
@ -82,7 +88,7 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
|
||||||
issueCommenterAvatar = itemView.findViewById(R.id.issueCommenterAvatar);
|
issueCommenterAvatar = itemView.findViewById(R.id.issueCommenterAvatar);
|
||||||
issueComment = itemView.findViewById(R.id.issueComment);
|
issueComment = itemView.findViewById(R.id.issueComment);
|
||||||
issueCommentDate = itemView.findViewById(R.id.issueCommentDate);
|
issueCommentDate = itemView.findViewById(R.id.issueCommentDate);
|
||||||
commentsOptionsMenu = itemView.findViewById(R.id.commentsOptionsMenu);
|
ImageView commentsOptionsMenu = itemView.findViewById(R.id.commentsOptionsMenu);
|
||||||
commendBodyRaw = itemView.findViewById(R.id.commendBodyRaw);
|
commendBodyRaw = itemView.findViewById(R.id.commendBodyRaw);
|
||||||
commentModified = itemView.findViewById(R.id.commentModified);
|
commentModified = itemView.findViewById(R.id.commentModified);
|
||||||
commenterUsername = itemView.findViewById(R.id.commenterUsername);
|
commenterUsername = itemView.findViewById(R.id.commenterUsername);
|
||||||
|
@ -90,32 +96,32 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
|
||||||
|
|
||||||
commentsOptionsMenu.setOnClickListener(v -> {
|
commentsOptionsMenu.setOnClickListener(v -> {
|
||||||
|
|
||||||
final Context context = v.getContext();
|
final Context ctx = v.getContext();
|
||||||
final TinyDB tinyDb = new TinyDB(context);
|
final TinyDB tinyDb = new TinyDB(ctx);
|
||||||
final String loginUid = tinyDb.getString("loginUid");
|
final String loginUid = tinyDb.getString("loginUid");
|
||||||
|
|
||||||
@SuppressLint("InflateParams") View view = LayoutInflater.from(context).inflate(R.layout.bottom_sheet_issue_comments, null);
|
@SuppressLint("InflateParams") View view = LayoutInflater.from(ctx).inflate(R.layout.bottom_sheet_issue_comments, null);
|
||||||
|
|
||||||
TextView commentMenuEdit = view.findViewById(R.id.commentMenuEdit);
|
TextView commentMenuEdit = view.findViewById(R.id.commentMenuEdit);
|
||||||
TextView commentShare = view.findViewById(R.id.issueCommentShare);
|
TextView commentShare = view.findViewById(R.id.issueCommentShare);
|
||||||
//TextView commentMenuDelete = view.findViewById(R.id.commentMenuDelete);
|
TextView commentMenuDelete = view.findViewById(R.id.commentMenuDelete);
|
||||||
|
|
||||||
if(!loginUid.contentEquals(commenterUsername.getText())) {
|
if(!loginUid.contentEquals(commenterUsername.getText())) {
|
||||||
commentMenuEdit.setVisibility(View.GONE);
|
commentMenuEdit.setVisibility(View.GONE);
|
||||||
//commentMenuDelete.setVisibility(View.GONE);
|
commentMenuDelete.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
BottomSheetDialog dialog = new BottomSheetDialog(context);
|
BottomSheetDialog dialog = new BottomSheetDialog(ctx);
|
||||||
dialog.setContentView(view);
|
dialog.setContentView(view);
|
||||||
dialog.show();
|
dialog.show();
|
||||||
|
|
||||||
commentMenuEdit.setOnClickListener(ediComment -> {
|
commentMenuEdit.setOnClickListener(ediComment -> {
|
||||||
|
|
||||||
Intent intent = new Intent(context, ReplyToIssueActivity.class);
|
Intent intent = new Intent(ctx, ReplyToIssueActivity.class);
|
||||||
intent.putExtra("commentId", commendId.getText());
|
intent.putExtra("commentId", commendId.getText());
|
||||||
intent.putExtra("commentAction", "edit");
|
intent.putExtra("commentAction", "edit");
|
||||||
intent.putExtra("commentBody", commendBodyRaw.getText());
|
intent.putExtra("commentBody", commendBodyRaw.getText());
|
||||||
context.startActivity(intent);
|
ctx.startActivity(intent);
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -128,20 +134,21 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
|
||||||
// share issue comment
|
// share issue comment
|
||||||
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
|
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
|
||||||
sharingIntent.setType("text/plain");
|
sharingIntent.setType("text/plain");
|
||||||
String intentHeader = tinyDb.getString("issueNumber") + context.getResources().getString(R.string.hash) + "issuecomment-" + commendId.getText() + " " + tinyDb.getString("issueTitle");
|
String intentHeader = tinyDb.getString("issueNumber") + ctx.getResources().getString(R.string.hash) + "issuecomment-" + commendId.getText() + " " + tinyDb.getString("issueTitle");
|
||||||
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, intentHeader);
|
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, intentHeader);
|
||||||
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, commentUrl);
|
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, commentUrl);
|
||||||
context.startActivity(Intent.createChooser(sharingIntent, intentHeader));
|
ctx.startActivity(Intent.createChooser(sharingIntent, intentHeader));
|
||||||
|
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/*commentMenuDelete.setOnClickListener(deleteComment -> {
|
commentMenuDelete.setOnClickListener(deleteComment -> {
|
||||||
|
|
||||||
|
deleteIssueComment(ctx, Integer.parseInt(commendId.getText().toString()), getAdapterPosition());
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
||||||
});*/
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -149,10 +156,79 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public IssueCommentsAdapter(Context mCtx, List<IssueComments> issuesCommentsMain) {
|
private void updateAdapter(int position) {
|
||||||
|
|
||||||
this.mCtx = mCtx;
|
issuesComments.remove(position);
|
||||||
this.issuesComments = issuesCommentsMain;
|
notifyItemRemoved(position);
|
||||||
|
notifyItemRangeChanged(position, issuesComments.size());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void deleteIssueComment(final Context ctx, final int commentId, int position) {
|
||||||
|
|
||||||
|
final TinyDB tinyDb = new TinyDB(ctx);
|
||||||
|
final String instanceUrl = tinyDb.getString("instanceUrl");
|
||||||
|
final String loginUid = tinyDb.getString("loginUid");
|
||||||
|
final String instanceToken = "token " + tinyDb.getString(loginUid + "-token");
|
||||||
|
String[] repoFullName = tinyDb.getString("repoFullName").split("/");
|
||||||
|
if (repoFullName.length != 2) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final String repoOwner = repoFullName[0];
|
||||||
|
final String repoName = repoFullName[1];
|
||||||
|
|
||||||
|
Call<JsonElement> call;
|
||||||
|
|
||||||
|
call = RetrofitClient
|
||||||
|
.getInstance(instanceUrl, ctx)
|
||||||
|
.getApiInterface()
|
||||||
|
.deleteComment(instanceToken, repoOwner, repoName, commentId);
|
||||||
|
|
||||||
|
call.enqueue(new Callback<JsonElement>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResponse(@NonNull Call<JsonElement> call, @NonNull retrofit2.Response<JsonElement> response) {
|
||||||
|
|
||||||
|
if(response.code() == 204) {
|
||||||
|
|
||||||
|
updateAdapter(position);
|
||||||
|
Toasty.info(ctx, ctx.getResources().getString(R.string.deleteCommentSuccess));
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(response.code() == 401) {
|
||||||
|
|
||||||
|
AlertDialogs.authorizationTokenRevokedDialog(ctx, ctx.getResources().getString(R.string.alertDialogTokenRevokedTitle),
|
||||||
|
ctx.getResources().getString(R.string.alertDialogTokenRevokedMessage),
|
||||||
|
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyNegativeButton),
|
||||||
|
ctx.getResources().getString(R.string.alertDialogTokenRevokedCopyPositiveButton));
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(response.code() == 403) {
|
||||||
|
|
||||||
|
Toasty.info(ctx, ctx.getString(R.string.authorizeError));
|
||||||
|
|
||||||
|
}
|
||||||
|
else if(response.code() == 404) {
|
||||||
|
|
||||||
|
Toasty.info(ctx, ctx.getString(R.string.apiNotFound));
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
Toasty.info(ctx, ctx.getString(R.string.genericError));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(@NonNull Call<JsonElement> call, @NonNull Throwable t) {
|
||||||
|
|
||||||
|
Toasty.error(ctx, ctx.getResources().getString(R.string.genericServerResponseError));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,20 +294,13 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
|
||||||
return Collections.singleton("drawable");
|
return Collections.singleton("drawable");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
plugin.placeholderProvider(new ImagesPlugin.PlaceholderProvider() {
|
plugin.placeholderProvider(drawable -> null);
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Override
|
|
||||||
public Drawable providePlaceholder(@NonNull AsyncDrawable drawable) {
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
plugin.addMediaDecoder(GifMediaDecoder.create(false));
|
plugin.addMediaDecoder(GifMediaDecoder.create(false));
|
||||||
plugin.addMediaDecoder(SvgMediaDecoder.create(mCtx.getResources()));
|
plugin.addMediaDecoder(SvgMediaDecoder.create(mCtx.getResources()));
|
||||||
plugin.addMediaDecoder(SvgMediaDecoder.create());
|
plugin.addMediaDecoder(SvgMediaDecoder.create());
|
||||||
plugin.defaultMediaDecoder(DefaultMediaDecoder.create(mCtx.getResources()));
|
plugin.defaultMediaDecoder(DefaultMediaDecoder.create(mCtx.getResources()));
|
||||||
plugin.defaultMediaDecoder(DefaultMediaDecoder.create());
|
plugin.defaultMediaDecoder(DefaultMediaDecoder.create());
|
||||||
|
|
||||||
}
|
}
|
||||||
})).usePlugin(new AbstractMarkwonPlugin() {
|
})).usePlugin(new AbstractMarkwonPlugin() {
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ package org.mian.gitnex.clients;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import org.mian.gitnex.helpers.ssl.MemorizingTrustManager;
|
||||||
import org.mian.gitnex.interfaces.ApiInterface;
|
import org.mian.gitnex.interfaces.ApiInterface;
|
||||||
import org.mian.gitnex.interfaces.WebInterface;
|
import org.mian.gitnex.interfaces.WebInterface;
|
||||||
import org.mian.gitnex.helpers.ssl.MemorizingTrustManager;
|
|
||||||
import org.mian.gitnex.util.AppUtil;
|
import org.mian.gitnex.util.AppUtil;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
|
@ -44,12 +44,9 @@ public class RetrofitClient {
|
||||||
MemorizingTrustManager memorizingTrustManager = new MemorizingTrustManager(ctx);
|
MemorizingTrustManager memorizingTrustManager = new MemorizingTrustManager(ctx);
|
||||||
sslContext.init(null, new X509TrustManager[]{memorizingTrustManager}, new SecureRandom());
|
sslContext.init(null, new X509TrustManager[]{memorizingTrustManager}, new SecureRandom());
|
||||||
|
|
||||||
OkHttpClient.Builder okHttpClient = new OkHttpClient.Builder()
|
OkHttpClient.Builder okHttpClient = new OkHttpClient.Builder().cache(cache)
|
||||||
.cache(cache)
|
|
||||||
//.addInterceptor(logging)
|
//.addInterceptor(logging)
|
||||||
.sslSocketFactory(sslContext.getSocketFactory(), memorizingTrustManager)
|
.sslSocketFactory(sslContext.getSocketFactory(), memorizingTrustManager).hostnameVerifier(memorizingTrustManager.wrapHostnameVerifier(HttpsURLConnection.getDefaultHostnameVerifier())).addInterceptor(chain -> {
|
||||||
.hostnameVerifier(memorizingTrustManager.wrapHostnameVerifier(HttpsURLConnection.getDefaultHostnameVerifier()))
|
|
||||||
.addInterceptor(chain -> {
|
|
||||||
|
|
||||||
Request request = chain.request();
|
Request request = chain.request();
|
||||||
if(connToInternet) {
|
if(connToInternet) {
|
||||||
|
@ -61,11 +58,7 @@ public class RetrofitClient {
|
||||||
return chain.proceed(request);
|
return chain.proceed(request);
|
||||||
});
|
});
|
||||||
|
|
||||||
Retrofit.Builder builder = new Retrofit.Builder()
|
Retrofit.Builder builder = new Retrofit.Builder().baseUrl(instanceUrl).client(okHttpClient.build()).addConverterFactory(ScalarsConverterFactory.create()).addConverterFactory(GsonConverterFactory.create());
|
||||||
.baseUrl(instanceUrl)
|
|
||||||
.client(okHttpClient.build())
|
|
||||||
.addConverterFactory(ScalarsConverterFactory.create())
|
|
||||||
.addConverterFactory(GsonConverterFactory.create());
|
|
||||||
|
|
||||||
retrofit = builder.build();
|
retrofit = builder.build();
|
||||||
|
|
||||||
|
@ -77,14 +70,17 @@ public class RetrofitClient {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static synchronized RetrofitClient getInstance(String instanceUrl, Context ctx) {
|
public static synchronized RetrofitClient getInstance(String instanceUrl, Context ctx) {
|
||||||
|
|
||||||
return new RetrofitClient(instanceUrl, ctx);
|
return new RetrofitClient(instanceUrl, ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApiInterface getApiInterface() {
|
public ApiInterface getApiInterface() {
|
||||||
|
|
||||||
return retrofit.create(ApiInterface.class);
|
return retrofit.create(ApiInterface.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public WebInterface getWebInterface() {
|
public WebInterface getWebInterface() {
|
||||||
|
|
||||||
return retrofit.create(WebInterface.class);
|
return retrofit.create(WebInterface.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -272,4 +272,7 @@ public interface ApiInterface {
|
||||||
|
|
||||||
@PATCH("repos/{owner}/{repo}/milestones/{index}") // close / reopen milestone
|
@PATCH("repos/{owner}/{repo}/milestones/{index}") // close / reopen milestone
|
||||||
Call<JsonElement> closeReopenMilestone(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName, @Path("index") int index, @Body Milestones jsonStr);
|
Call<JsonElement> closeReopenMilestone(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName, @Path("index") int index, @Body Milestones jsonStr);
|
||||||
|
|
||||||
|
@DELETE("repos/{owner}/{repo}/issues/comments/{id}") // delete own comment from issue
|
||||||
|
Call<JsonElement> deleteComment(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName, @Path("id") int commentIndex);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,18 @@
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="16dp" />
|
android:padding="16dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/commentMenuDelete"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:text="@string/menuDeleteText"
|
||||||
|
android:drawableStart="@drawable/ic_delete"
|
||||||
|
android:drawablePadding="24dp"
|
||||||
|
android:textColor="?attr/primaryTextColor"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:padding="16dp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/issueCommentShare"
|
android:id="@+id/issueCommentShare"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -41,19 +53,6 @@
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:padding="16dp" />
|
android:padding="16dp" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/commentMenuDelete"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:text="@string/menuDeleteText"
|
|
||||||
android:drawableStart="@drawable/ic_delete"
|
|
||||||
android:drawablePadding="24dp"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:padding="16dp"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
</androidx.core.widget.NestedScrollView>
|
||||||
|
|
|
@ -356,11 +356,13 @@
|
||||||
<string name="teamCreatedError">Something went wrong, please try again</string>
|
<string name="teamCreatedError">Something went wrong, please try again</string>
|
||||||
<!-- create team -->
|
<!-- create team -->
|
||||||
|
|
||||||
<!-- edit comment -->
|
<!-- issue comments -->
|
||||||
<string name="editCommentTitle">Edit Comment</string>
|
<string name="editCommentTitle">Edit Comment</string>
|
||||||
<string name="editCommentButtonText">Edit</string>
|
<string name="editCommentButtonText">Edit</string>
|
||||||
<string name="editCommentUpdatedText">Comment updated</string>
|
<string name="editCommentUpdatedText">Comment updated</string>
|
||||||
<!-- edit comment -->
|
<string name="issueCommentShare">Share Comment</string>
|
||||||
|
<string name="deleteCommentSuccess">Comment deleted successfully</string>
|
||||||
|
<!-- issue comments -->
|
||||||
|
|
||||||
<!-- add collaborator -->
|
<!-- add collaborator -->
|
||||||
<string name="addCollaboratorTitle">Add / Remove Collaborator</string>
|
<string name="addCollaboratorTitle">Add / Remove Collaborator</string>
|
||||||
|
@ -531,6 +533,7 @@
|
||||||
<string name="strPublic" translatable="false">public</string>
|
<string name="strPublic" translatable="false">public</string>
|
||||||
<string name="defaultCopy" translatable="false">Default</string>
|
<string name="defaultCopy" translatable="false">Default</string>
|
||||||
<string name="viewInBrowser">View in Browser</string>
|
<string name="viewInBrowser">View in Browser</string>
|
||||||
|
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
|
|
||||||
<string name="translateText">Translate GitNex with Crowdin</string>
|
<string name="translateText">Translate GitNex with Crowdin</string>
|
||||||
|
@ -609,7 +612,6 @@
|
||||||
<string name="mtm_decision_once">Once</string>
|
<string name="mtm_decision_once">Once</string>
|
||||||
<string name="mtm_decision_abort">Abort</string>
|
<string name="mtm_decision_abort">Abort</string>
|
||||||
|
|
||||||
<string name="issueCommentShare">Share Comment</string>
|
|
||||||
|
|
||||||
<string name="issueSubscribtion">Issue Subscribed</string>
|
<string name="issueSubscribtion">Issue Subscribed</string>
|
||||||
<string name="issueSubscribtionError">Issue Subscription failed</string>
|
<string name="issueSubscribtionError">Issue Subscription failed</string>
|
||||||
|
|
Loading…
Reference in New Issue