- if (menuItemId == R.id.permissions) { // Permissions.
- // Instantiate the permissions dialog fragment.
- val permissionsDialogFragment = PermissionsDialog()
+ when (menuItem.itemId) {
+ R.id.permissions -> { // Permissions.
+ // Instantiate the permissions dialog fragment.
+ val permissionsDialogFragment = WebViewDialog().type(WebViewDialog.PERMISSIONS)
+
+ // Show the alert dialog.
+ permissionsDialogFragment.show(supportFragmentManager, getString(R.string.permissions))
+ }
+
+ R.id.privacy_policy -> { // Privacy Policy.
+ // Instantiate the privacy policy dialog fragment.
+ val privacyPolicyDialogFragment = WebViewDialog().type(WebViewDialog.PRIVACY_POLICY)
+
+ // Show the alert dialog.
+ privacyPolicyDialogFragment.show(supportFragmentManager, getString(R.string.privacy_policy))
+ }
+
+ R.id.changelog -> { // Changelog.
+ // Instantiate the changelog dialog fragment.
+ val changelogDialogFragment = WebViewDialog().type(WebViewDialog.CHANGELOG)