Add Issue/Comment Reactions (#557)
Minor performance improvements. Merge branch 'master' of https://codeberg.org/gitnex/GitNex into issue-reactions Improving color of selected elements. First, fully working implementation of reactions. Merge branch 'master' of https://codeberg.org/gitnex/GitNex into issue-reactions Conflicts: app/src/main/res/layout/bottom_sheet_issue_comments.xml app/src/main/res/layout/list_issue_comments.xml (Hopefully) fixing merge issues. Merge branch 'master' of https://codeberg.org/gitnex/GitNex into issue-reactions Conflicts: app/src/main/java/org/mian/gitnex/interfaces/ApiInterface.java app/src/main/res/layout/activity_issue_detail.xml app/src/main/res/layout/bottom_sheet_issue_comments.xml app/src/main/res/layout/bottom_sheet_single_issue.xml app/src/main/res/values/colors.xml Moving reactions below time frame on comments. Merge branch 'master' into layout-reactions Add IssueReactions Merge remote-tracking branch 'origin/layout-reactions' into layout-reactions Merge branch 'master' of https://gitea.com/gitnex/GitNex into layout-reactions Merge branch 'master' into layout-reactions Applying to pulls and issues. Merge branch 'master' of https://gitea.com/gitnex/GitNex into layout-reactions Providing external layouts. Some improvements. Adding comment emote indications. Adding circle around emotes. Adding some padding. First tests. Co-authored-by: opyale <opyale@noreply.gitea.io> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: 6543 <6543@noreply.gitea.io> Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/557 Reviewed-by: M M Arif <mmarif@noreply.codeberg.org>
This commit is contained in:
@@ -8,6 +8,7 @@ import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
@@ -20,6 +21,7 @@ import org.mian.gitnex.activities.MergePullRequestActivity;
|
||||
import org.mian.gitnex.helpers.TinyDB;
|
||||
import org.mian.gitnex.helpers.Toasty;
|
||||
import org.mian.gitnex.helpers.Version;
|
||||
import org.mian.gitnex.views.ReactionSpinner;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
@@ -51,6 +53,29 @@ public class BottomSheetSingleIssueFragment extends BottomSheetDialogFragment {
|
||||
TextView subscribeIssue = v.findViewById(R.id.subscribeIssue);
|
||||
TextView unsubscribeIssue = v.findViewById(R.id.unsubscribeIssue);
|
||||
|
||||
LinearLayout linearLayout = v.findViewById(R.id.commentReactionButtons);
|
||||
|
||||
Bundle bundle1 = new Bundle();
|
||||
|
||||
String repoFullName = tinyDB.getString("repoFullName");
|
||||
String[] parts = repoFullName.split("/");
|
||||
|
||||
bundle1.putString("repoOwner", parts[0]);
|
||||
bundle1.putString("repoName", parts[1]);
|
||||
bundle1.putInt("issueId", Integer.parseInt(tinyDB.getString("issueNumber")));
|
||||
|
||||
ReactionSpinner reactionSpinner = new ReactionSpinner(ctx, bundle1);
|
||||
reactionSpinner.setOnInteractedListener(() -> {
|
||||
|
||||
tinyDB.putBoolean("singleIssueUpdate", true);
|
||||
|
||||
bmListener.onButtonClicked("onResume");
|
||||
dismiss();
|
||||
|
||||
});
|
||||
|
||||
linearLayout.addView(reactionSpinner);
|
||||
|
||||
if(tinyDB.getString("issueType").equalsIgnoreCase("Pull")) {
|
||||
|
||||
editIssue.setText(R.string.editPrText);
|
||||
|
||||
Reference in New Issue
Block a user