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();
}
});
}
}