About menu: Added changelog and fixed wording

This commit is contained in:
FlyingP1g FlyingP1g
2022-07-12 21:10:29 +03:00
parent 6ec382cfc4
commit 8ea7204cf6
3 changed files with 28 additions and 3 deletions

View File

@@ -36,6 +36,7 @@ public class AboutFragment extends Fragment {
private TextView briarVersion;
private TextView briarWebsite;
private TextView briarSourceCode;
private TextView briarChangelog;
@Nullable
@Override
@@ -55,6 +56,7 @@ public class AboutFragment extends Fragment {
getString(R.string.briar_version, BuildConfig.VERSION_NAME));
briarWebsite = requireActivity().findViewById(R.id.BriarWebsite);
briarSourceCode = requireActivity().findViewById(R.id.BriarSourceCode);
briarChangelog = requireActivity().findViewById(R.id.BriarChangelog);
briarWebsite.setOnClickListener(View -> {
String url = "https://briarproject.org/";
Intent i = new Intent(Intent.ACTION_VIEW);
@@ -79,6 +81,19 @@ public class AboutFragment extends Fragment {
R.string.error_start_activity, LENGTH_LONG).show();
}
});
briarChangelog.setOnClickListener(View -> {
String url =
"https://code.briarproject.org/briar/briar/-/wikis/changelog";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
try {
startActivity(i);
} catch (ActivityNotFoundException e) {
logException(LOG, WARNING, e);
Toast.makeText(requireContext(),
R.string.error_start_activity, LENGTH_LONG).show();
}
});
}
}

View File

@@ -42,6 +42,15 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/BriarWebsite" />
<TextView
android:id="@+id/BriarChangelog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/briar_changelog"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/BriarSourceCode" />
<TextView
android:id="@+id/TranslatorThanks"
android:layout_width="match_parent"
@@ -50,6 +59,6 @@
android:text="@string/translator_thanks"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/BriarSourceCode" />
app:layout_constraintTop_toBottomOf="@+id/BriarChangelog" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -695,8 +695,9 @@
<string name="about_title">About</string>
<string name="briar_version">Briar Version: %s</string>
<string name="links">Links</string>
<string name="briar_website">\u2022 <a href="">Briar website</a></string>
<string name="briar_source_code">\u2022 <a href="">Briar source code</a></string>
<string name="briar_website">\u2022 <a href="">Website</a></string>
<string name="briar_source_code">\u2022 <a href="">Source code</a></string>
<string name="briar_changelog">\u2022 <a href="">Changelog</a></string>
<string name="translator_thanks">Thanks to all the contributors at the Localization Lab</string><!-- Here translators can add their names or Transifex usernames(eg "Thanks to all the contributors at the Localization Lab, especially Tom, Matthew and Jerry") -->
<!-- Conversation Settings -->