aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/com/zeapo/pwdstore/git
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-06-28 09:59:15 +0200
committerGitHub <noreply@github.com>2020-06-28 13:29:15 +0530
commit535ad1dbb137f4fc633cde439b24818843220eea (patch)
treede4eaef51c6ad0fbff2708b4fd035ec6b913062e /app/src/main/java/com/zeapo/pwdstore/git
parent9fc5d337b8dfecb2821225f006b1bf616d678159 (diff)
downloadHardenedPass-535ad1dbb137f4fc633cde439b24818843220eea.tar.gz
HardenedPass-535ad1dbb137f4fc633cde439b24818843220eea.zip
Consolidate password list refresh (#887)
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/git')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.kt5
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/PushOperation.kt2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/ResetToRemoteOperation.kt2
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/SyncOperation.kt2
7 files changed, 6 insertions, 11 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt b/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt
index 31c376eb..8533187f 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/BreakOutOfDetached.kt
@@ -58,7 +58,7 @@ class BreakOutOfDetached(fileDir: File, callingActivity: Activity) : GitOperatio
}
}
}
- GitAsyncTask(callingActivity, true, this, null)
+ GitAsyncTask(callingActivity, this, null)
.execute(*this.commands.toTypedArray())
}
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt
index 705566be..0e89af0f 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt
@@ -36,7 +36,7 @@ class CloneOperation(fileDir: File, callingActivity: Activity) : GitOperation(fi
override fun execute() {
(this.command as? CloneCommand)?.setCredentialsProvider(this.provider)
- GitAsyncTask(callingActivity, false, this, Intent()).execute(this.command)
+ GitAsyncTask(callingActivity, this, Intent()).execute(this.command)
}
override fun onError(err: Exception) {
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.kt b/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.kt
index a2b4e2a8..84e08dfc 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/GitAsyncTask.kt
@@ -10,7 +10,6 @@ import android.content.Context
import android.content.Intent
import android.os.AsyncTask
import com.github.ajalt.timberkt.e
-import com.zeapo.pwdstore.PasswordStore
import com.zeapo.pwdstore.R
import com.zeapo.pwdstore.git.config.SshjSessionFactory
import net.schmizz.sshj.common.DisconnectReason
@@ -30,7 +29,6 @@ import java.lang.ref.WeakReference
class GitAsyncTask(
activity: Activity,
- private val refreshListOnEnd: Boolean,
private val operation: GitOperation,
private val finishWithResultOnEnd: Intent?,
private val silentlyExecute: Boolean = false
@@ -170,9 +168,6 @@ class GitAsyncTask(
}
}
}
- if (refreshListOnEnd) {
- (activity as? PasswordStore)?.resetPasswordList()
- }
(SshSessionFactory.getInstance() as? SshjSessionFactory)?.clearCredentials()
SshSessionFactory.setInstance(null)
}
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt
index 2d5f6bbe..c543f885 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/PullOperation.kt
@@ -35,7 +35,7 @@ class PullOperation(fileDir: File, callingActivity: Activity) : GitOperation(fil
override fun execute() {
(this.command as? PullCommand)?.setCredentialsProvider(this.provider)
- GitAsyncTask(callingActivity, false, this, Intent()).execute(this.command)
+ GitAsyncTask(callingActivity, this, Intent()).execute(this.command)
}
override fun onError(err: Exception) {
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.kt
index 52e6e537..fc58705f 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/PushOperation.kt
@@ -35,7 +35,7 @@ class PushOperation(fileDir: File, callingActivity: Activity) : GitOperation(fil
override fun execute() {
(this.command as? PushCommand)?.setCredentialsProvider(this.provider)
- GitAsyncTask(callingActivity, false, this, Intent()).execute(this.command)
+ GitAsyncTask(callingActivity, this, Intent()).execute(this.command)
}
override fun onError(err: Exception) {
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/ResetToRemoteOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/ResetToRemoteOperation.kt
index c652889d..be9e929f 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/ResetToRemoteOperation.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/ResetToRemoteOperation.kt
@@ -41,7 +41,7 @@ class ResetToRemoteOperation(fileDir: File, callingActivity: Activity) : GitOper
override fun execute() {
this.fetchCommand?.setCredentialsProvider(this.provider)
- GitAsyncTask(callingActivity, false, this, Intent())
+ GitAsyncTask(callingActivity, this, Intent())
.execute(this.addCommand, this.fetchCommand, this.resetCommand)
}
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/SyncOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/SyncOperation.kt
index 1f241c64..3af6f08d 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/SyncOperation.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/SyncOperation.kt
@@ -50,7 +50,7 @@ class SyncOperation(fileDir: File, callingActivity: Activity) : GitOperation(fil
this.pullCommand?.setCredentialsProvider(this.provider)
this.pushCommand?.setCredentialsProvider(this.provider)
}
- GitAsyncTask(callingActivity, false, this, Intent()).execute(this.addCommand, this.statusCommand, this.commitCommand, this.pullCommand, this.pushCommand)
+ GitAsyncTask(callingActivity, this, Intent()).execute(this.addCommand, this.statusCommand, this.commitCommand, this.pullCommand, this.pushCommand)
}
override fun onError(err: Exception) {