Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved feedback to "More" page links #582

Merged
merged 3 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ class AboutFragment : Fragment() {
startActivity(i)
}

view.feedback_btn?.setOnClickListener {
val link = Intent(Intent.ACTION_VIEW, Uri.parse("https://airtable.com/shr1oylDR3qzCpTXq"))
startActivity(link)
}

view.licenses_btn?.setOnClickListener {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
val webView = LayoutInflater.from(mActivity).inflate(R.layout.dialog_licenses, null) as WebView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ class PreferenceFragment : PreferenceFragmentCompat() {
return@setOnPreferenceClickListener true
}

val feedbackPref: Preference? = findPreference("pref_feedback_link")
feedbackPref?.setOnPreferenceClickListener {
openLink(Feedback)
return@setOnPreferenceClickListener true
}

val pennHomepagePref: Preference? = findPreference("pref_penn_link")
pennHomepagePref?.setOnPreferenceClickListener {
openLink(PennHomepage)
Expand Down Expand Up @@ -234,6 +240,7 @@ class PreferenceFragment : PreferenceFragmentCompat() {

companion object {
private const val PennLabs = "https://pennlabs.org"
private const val Feedback = "https://airtable.com/shr1oylDR3qzCpTXq"
private const val PennHomepage = "https://www.upenn.edu"
private const val CampusExpress = "https://prod.campusexpress.upenn.edu"
private const val Canvas = "https://canvas.upenn.edu"
Expand Down
15 changes: 1 addition & 14 deletions PennMobile/src/main/res/layout/fragment_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/about_mission_tv" />

<Button
android:id="@+id/feedback_btn"
android:layout_width="135sp"
android:layout_height="32sp"
android:layout_marginBottom="10dp"
android:background="@drawable/dark_rounded_border"
android:text="@string/feedback"
android:textColor="@color/logo_dark_blue"
android:textSize="12sp"
app:layout_constraintBottom_toTopOf="@+id/licenses_btn"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<TextView
android:id="@+id/our_team_tv"
android:layout_width="wrap_content"
Expand Down Expand Up @@ -182,7 +169,7 @@
android:layout_marginTop="16dp"
android:layout_marginEnd="32dp"
android:layout_marginBottom="16dp"
app:layout_constraintBottom_toTopOf="@+id/feedback_btn"
app:layout_constraintBottom_toTopOf="@+id/licenses_btn"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/alumni_tv" />
Expand Down
6 changes: 5 additions & 1 deletion PennMobile/src/main/res/xml/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@
app:iconSpaceReserved="false"
app:key="pref_labs_link"
app:title="Penn Labs" />

<Preference
android:id="@+id/pref_feedback_link"
app:iconSpaceReserved="false"
app:key="pref_feedback_link"
app:title="Feedback" />
<Preference
android:id="@+id/pref_penn_link"
app:iconSpaceReserved="false"
Expand Down