From 52e2139f6afc14a2b442e89b4bcb2095870c6a0f Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Wed, 12 Aug 2020 02:48:54 +0530 Subject: Notify user when remote branch is up-to-date (#1009) * Notify user when remote branch is up-to-date Fixes #1000 Signed-off-by: Harsh Shandilya * Update changelog Signed-off-by: Harsh Shandilya --- .../main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt | 11 +++++++++++ app/src/main/res/values/strings.xml | 1 + 2 files changed, 12 insertions(+) (limited to 'app') diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt b/app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt index 24c42df2..4f4797d8 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitCommandExecutor.kt @@ -7,6 +7,7 @@ package com.zeapo.pwdstore.git import android.app.Activity import android.content.Intent +import android.widget.Toast import androidx.fragment.app.FragmentActivity import com.github.ajalt.timberkt.e import com.google.android.material.snackbar.Snackbar @@ -86,6 +87,16 @@ class GitCommandExecutor( PushException(PushException.Reason.GENERIC, rru.message) } } + RemoteRefUpdate.Status.UP_TO_DATE -> { + withContext(Dispatchers.Main) { + Toast.makeText( + activity.applicationContext, + activity.applicationContext.getString(R.string.git_push_up_to_date), + Toast.LENGTH_SHORT + ).show() + } + null + } else -> null } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 46dfa401..347de2ed 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -214,6 +214,7 @@ Synchronize repository Pull from remote Push to remote + Everything up-to-date Show the password Control the visibility of the passwords once decrypted. This does not disable copying to clipboard. Show extra content -- cgit v1.2.3