aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorAlexander Kirillov <cupsman1986@gmail.com>2020-08-29 17:48:56 +0300
committerGitHub <noreply@github.com>2020-08-29 20:18:56 +0530
commit55d64fb73710d8dcadd28089ab233cd543830184 (patch)
treecf5eeded5c36c7a398fddd0af8bd2089b102f268 /app/src/main/java
parent0f0d1994e589b4f2b2603c882f52c79e2307a4f7 (diff)
Simplify decrypt intent creation (#1069)
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/LaunchActivity.kt13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/LaunchActivity.kt b/app/src/main/java/com/zeapo/pwdstore/LaunchActivity.kt
index 430f683a..ed943451 100644
--- a/app/src/main/java/com/zeapo/pwdstore/LaunchActivity.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/LaunchActivity.kt
@@ -41,12 +41,13 @@ class LaunchActivity : AppCompatActivity() {
private fun startTargetActivity(noAuth: Boolean) {
if (intent.action == ACTION_DECRYPT_PASS) {
- val decryptIntent = Intent(this, DecryptActivity::class.java)
- decryptIntent.putExtra("NAME", intent.getStringExtra("NAME"))
- decryptIntent.putExtra("FILE_PATH", intent.getStringExtra("FILE_PATH"))
- decryptIntent.putExtra("REPO_PATH", intent.getStringExtra("REPO_PATH"))
- decryptIntent.putExtra("LAST_CHANGED_TIMESTAMP", intent.getLongExtra("LAST_CHANGED_TIMESTAMP", 0L))
- startActivity(decryptIntent)
+ Intent(this, DecryptActivity::class.java).apply {
+ putExtra("NAME", intent.getStringExtra("NAME"))
+ putExtra("FILE_PATH", intent.getStringExtra("FILE_PATH"))
+ putExtra("REPO_PATH", intent.getStringExtra("REPO_PATH"))
+ putExtra("LAST_CHANGED_TIMESTAMP", intent.getLongExtra("LAST_CHANGED_TIMESTAMP", 0L))
+ startActivity(this)
+ }
} else {
startActivity(Intent(this, PasswordStore::class.java))
}