Skip to content

Commit

Permalink
Feat : Added a feature for users to add feadback on github (commons-a…
Browse files Browse the repository at this point in the history
…pp#5578)

* Feat : Added a place for users to add feadback on github

* Code Cleanup : Added Github Issue URL as Const

* Homogenized

---------

Co-authored-by: Nicolas Raoul <[email protected]>
  • Loading branch information
neeldoshii and nicolas-raoul authored Apr 1, 2024
1 parent 3d1efec commit 54312fc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class MoreBottomSheetFragment extends BottomSheetDialogFragment {
@Named("commons-page-edit")
PageEditClient pageEditClient;

private static final String GITHUB_ISSUES_URL = "https://github.com/commons-app/apps-android-commons/issues";
@Nullable
@Override
public View onCreateView(@NonNull final LayoutInflater inflater,
Expand All @@ -76,11 +77,19 @@ public View onCreateView(@NonNull final LayoutInflater inflater,
binding.moreSettings.setOnClickListener(v -> onSettingsClicked());
binding.moreProfile.setOnClickListener(v -> onProfileClicked());
binding.morePeerReview.setOnClickListener(v -> onPeerReviewClicked());
binding.moreFeedbackGithub.setOnClickListener(v -> onFeedbackGithubClicked());

setUserName();
return binding.getRoot();
}

private void onFeedbackGithubClicked() {
final Intent intent;
intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(GITHUB_ISSUES_URL));
startActivity(intent);
}

@Override
public void onAttach(@NonNull final Context context) {
super.onAttach(context);
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/res/layout/fragment_more_bottom_sheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,17 @@
android:text="@string/navigation_item_feedback"
android:textSize="18sp" />

<TextView
android:id="@+id/more_feedback_github"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:drawableLeft="@drawable/ic_action_github"
android:drawablePadding="12dp"
android:padding="8dp"
android:text="@string/navigation_item_feedback_github"
android:textSize="18sp" />

<TextView
android:id="@+id/more_about"
android:layout_width="match_parent"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@
<string name="navigation_item_about">About</string>
<string name="navigation_item_settings">Settings</string>
<string name="navigation_item_feedback">Feedback</string>
<string name="navigation_item_feedback_github">Feedback via GitHub</string>
<string name="navigation_item_logout">Logout</string>
<string name="navigation_item_info">Tutorial</string>
<string name="navigation_item_notification">Notifications</string>
Expand Down

0 comments on commit 54312fc

Please sign in to comment.