mirror of
https://github.com/android-password-store/Android-Password-Store.git
synced 2025-09-06 04:51:38 +02:00
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 <me@msfjarvis.dev> * Update changelog Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
15aa929802
commit
52e2139f6a
|
@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
|
|||
- Slightly reduce APK size
|
||||
- Always show the parent path in entries
|
||||
- Passwords will no longer be copied to the clipboard by default
|
||||
- Notify user if there was nothing to push
|
||||
|
||||
### Fixed
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
}
|
||||
|
|
|
@ -214,6 +214,7 @@
|
|||
<string name="git_sync">Synchronize repository</string>
|
||||
<string name="git_pull">Pull from remote</string>
|
||||
<string name="git_push">Push to remote</string>
|
||||
<string name="git_push_up_to_date">Everything up-to-date</string>
|
||||
<string name="show_password_pref_title">Show the password</string>
|
||||
<string name="show_password_pref_summary">Control the visibility of the passwords once decrypted. This does not disable copying to clipboard.</string>
|
||||
<string name="show_extra_content_pref_title">Show extra content</string>
|
||||
|
|
Loading…
Reference in a new issue