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 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/src/main/java/com/zeapo') 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 } -- cgit v1.2.3