if previousUrl is empty it means that this the first time the method is being called, and url
has not been built yet. We let things slide for the first pass so that the actual logic
only kicks in when it needs to.
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Work around incompatibility between AndroidFastScroll and recyclerview-selection
* move hacked recyclerview into separate package
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Make RecyclerViewHelper private static
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
* Refactor git logic into separate parts
* Extract hardcoded strings
* Add KDoc to updateHostname, remove unused field
* Cleanups
* Fix dialog message
* Wire in repository clone flow
* spotless
* Remove unused method
* Cleanup GitActivity
- Rename to GitOperationActivity.
- Ensure identityBuilder is always closed regardless of what fragment uses it.
- Remove hardcoded "Operation" strings and replace with REQUEST_ARG_OP.
- Apply a transparent theme to GitOperationActivity make the UI less jarring.
* Tweak some stupidly worded dialog messages
As pointed out in #629, these strings are shoddily worded and do not express any clear intent to the
user, leaving them confused and angry.
* GitOperationActivity: wrap Context to ensure right theme is used
* spotless
* undo build.gradle change
* Use correct parent theme, remove now useless wrapping
* GitServerConfigActivity: fix repository clone flow
* temp: disable leakcanary
framework leaks on Samsung are pissing me off
* Make system bars transparent in git activity
* Tweak HTTPS password layout
* Unhardcode wrong passphrase string
* Store SSH passphrase in EncryptedSharedPreferences
Also revamp the dialog to look a bit better
* Implement support for remembering HTTPS password
Fixes#521
* Try to patch HTTPS remote creation logic
* Update security-crypto
* Clear saved passphrase/password on auth failure
* Revert "Update security-crypto"
Broken on R DP2.1
This reverts commit 4b20371dd42c512a3dd3b759859abb6c1ffd2961.
* Revert "temp: disable leakcanary"
This reverts commit 2db7d41bd67b79c6dc8c5b359a7b27100379f45f.
* Update CHANGELOG
* Remove spacer
* Remove useless override
* Wrap git server activity in a ScrollView
* GitOperation: always finish calling activity when dialogs are dismissed
* Wipe saved password/passphrase when hostname changes
* Don't commit prefs updates
* Don't call listFiles excessively
* Finish activity after saving configuration
* Make ConnectionMode and Protocol enum classes
* Change SSH key passphrase key, don't wipe on host change
* Reimplement BaseGitActivity.updateUrl (was updateHostname)
* Use SharedPreferences.edit KTX extension
* Disable inapplicable connection modes depending on scheme
* BaseGitActivity: annotate onDestroy with CallSuper
We'll leak the identityBuilder connection otherwise
* Move input hack for AlertDialog into an extension function
We re-use this in many places
* Fix protocol/mode toggle issue and consistenly name options
* Fix a crash when opening GitServerConfigActivity without a repo
* Fix OpenKeychain callbacks by moving onActivityResult to BaseGitActivity
* Run spotlessApply
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Fabian Henneke <fabian@henneke.me>
* Add annotations to and reformat SearchableRepositoryViewModel.kt
* Address build warnings other than meaningful deprecations
* Deal with warnings in UserPreference.kt
* Don't list the current directory in search results
* Scroll to top result when search term is changed
* Match relative path in StrictDomain filter mode
* Improve and document DirectoryStructure null handling
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* PasswordStore: request WRITE_EXTERNAL_STORAGE permission instead
We wish to be able to write to our password store directory as well.
Fixes#697Fixes#365
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Reword changelog entry
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Modernize legacy RecyclerView adapters
Introduces new adapters based on the SearchableRepositoryViewModel and
using androidx.recyclerview.selection for multiselection support.
The following positive effects in behavior are observable to end-users:
- Search and navigation actions are executed on IO threads.
- RecyclerViews are now animated during searches (but not navigations).
- Exact scroll position is restored when navigating back.
- The ActionBar title is updated with the current folder name.
The following negative effects may warrant attention:
- Support for the "always search from root" setting has been removed.
- Due to a limitation of the fast scroll dependency, using the scroller
may result in unwanted multiselections. If this is not fixed in the
library, native fast scroller capabilities could be used, but these
are more limited in appearance and to not offer popups.
* Fix lint
* Fix FastScroller/SelectionTracker incompatibility
* Immediately react to settings changes
* List directory entries when search term is blank
* Use isEmpty() instead of == ""
* Replace adapter inheritance with builders and fix selection drags
* Remove dividers in password lists
* Run spotlessApply
* Use a more logical string in action mode
* Commonize and constify path bundle key
* Make lambda parameter name explicit
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
The path of a new entry created via Autofill should always be editable, even when no username is prefilled (e.g., when generating a new password or saving a form with no detected username field).
* Remove CI specific gradle props
They are installed by the CI pipeline automatically
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Upgrade AGP to 3.6.2
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Suppress android.useMinimalKeepRules warning
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
* Update to Spotless 3.28.1
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
Currently, PgpActivity resets or crashes when the orientation (or
screen size) changes.
Since we do not use separate resources in landscape mode, the easiest
and only slightly hacky solution is to tell the system to not recreate
the activity in response to these changes.
The IME search button is currently without function while the
PasswordStore SearchView is focused, which means that the keyboard
hides part of the search result until back is pressed.
This commit makes the IME button function like the back key in this
situation, dismissing the keyboard.
Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>
Restoring the scroll position in the main store fragment is currently
broken since the stored state (recyclerView.verticalScrollbarPosition)
is always 0 - it is just an enum that governs where the scrollbar is
placed on the screen.
The fix is to remember the list position of the last fully visible item
and scroll to it when restoring the scroll position.
Co-authored-by: Harsh Shandilya <msfjarvis@gmail.com>