diff options
| author | حسين <zidhussein@gmail.com> | 2018-12-25 14:39:32 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-25 14:39:32 +0000 |
| commit | 81aff5d870af5da4b16cc5ed455106dd58aefd54 (patch) | |
| tree | 69923380f3522b603d5041e72f65335e5ff0a0dd /app/src/main/java/com/zeapo/pwdstore/utils | |
| parent | 62954ee78f007545d7630d74c9e11ede90627309 (diff) | |
| download | HardenedPass-81aff5d870af5da4b16cc5ed455106dd58aefd54.tar.gz HardenedPass-81aff5d870af5da4b16cc5ed455106dd58aefd54.zip | |
Commit messages (#455)
* use full password path in add/edit git commit message
* commit strings are format strings
* use format strings in other languages
* use move/rename commit message
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/utils')
| -rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java index d02adeda..5c2231a5 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordItem.java @@ -1,19 +1,22 @@ package com.zeapo.pwdstore.utils; +import com.zeapo.pwdstore.crypto.PgpActivity; + import androidx.annotation.NonNull; import java.io.File; -public class PasswordItem implements Comparable{ +public class PasswordItem implements Comparable { public final static char TYPE_CATEGORY = 'c'; public final static char TYPE_PASSWORD = 'p'; - private char type; - private String name; - private PasswordItem parent; - private File file; - private String fullPathToParent; + private final char type; + private final String name; + private final PasswordItem parent; + private final File file; + private final String fullPathToParent; + private final String longName; /** Create a password item * @@ -24,7 +27,10 @@ public class PasswordItem implements Comparable{ this.parent = parent; this.type = type; this.file = file; - this.fullPathToParent = file.getAbsolutePath().replace(rootDir.getAbsolutePath(), "").replace(file.getName(), ""); + fullPathToParent = file.getAbsolutePath() + .replace(rootDir.getAbsolutePath(), "") + .replace(file.getName(), ""); + longName = PgpActivity.getLongName(fullPathToParent, rootDir.getAbsolutePath(), toString()); } /** Create a new Category item @@ -71,6 +77,10 @@ public class PasswordItem implements Comparable{ return this.fullPathToParent; } + public String getLongName() { + return longName; + } + @Override public String toString(){ return this.getName().replace(".gpg", ""); |
