Skip to content

Commit

Permalink
Moved Feedback button to links page on More
Browse files Browse the repository at this point in the history
  • Loading branch information
trinif committed Oct 1, 2023
1 parent a0d46b5 commit 4c6594f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 22 deletions.
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
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Sep 24 13:00:24 EDT 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
zipStorePath=wrapper/dists

0 comments on commit 4c6594f

Please sign in to comment.