From 0b4aad772b73da148cdbb43aff893dc401108e2c Mon Sep 17 00:00:00 2001 From: ligi Date: Sun, 16 Feb 2020 18:11:27 +0100 Subject: [PATCH] Improve kotlin style --- .../main/java/org/ligi/passandroid/ui/PassViewActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/org/ligi/passandroid/ui/PassViewActivity.kt b/android/src/main/java/org/ligi/passandroid/ui/PassViewActivity.kt index 339920a6..ebfa22b2 100644 --- a/android/src/main/java/org/ligi/passandroid/ui/PassViewActivity.kt +++ b/android/src/main/java/org/ligi/passandroid/ui/PassViewActivity.kt @@ -63,7 +63,7 @@ class PassViewActivity : PassViewActivityBase() { val fragment = PassViewFragment() fragment.arguments = Bundle().apply { - putString(PassViewActivityBase.EXTRA_KEY_UUID, getPass(i).id) + putString(EXTRA_KEY_UUID, getPass(i).id) } return fragment } @@ -91,8 +91,8 @@ class PassViewActivity : PassViewActivityBase() { } override fun onPrepareOptionsMenu(menu: Menu): Boolean { - menu.findItem(R.id.menu_map).isVisible = !currentPass.locations.isEmpty() - menu.findItem(R.id.menu_update).isVisible = PassViewActivityBase.mightPassBeAbleToUpdate(currentPass) + menu.findItem(R.id.menu_map).isVisible = currentPass.locations.isNotEmpty() + menu.findItem(R.id.menu_update).isVisible = mightPassBeAbleToUpdate(currentPass) menu.findItem(R.id.install_shortcut).isVisible = ShortcutManagerCompat.isRequestPinShortcutSupported(this) return super.onPrepareOptionsMenu(menu) }