Skip to content

Commit

Permalink
Merge branch 'release/4.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Jamet committed Sep 10, 2023
2 parents 31444a8 + 838c8f4 commit c6723ec
Show file tree
Hide file tree
Showing 13 changed files with 126 additions and 102 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
KeePassDX(4.0.1)
* Fix back lock #1635 #1629 #1634
* Fix lock button in settings #1630
* Improve theme translation #1631

KeePassDX(4.0.0)
* New UX/UI with Material 3 #1183 #1529 #1428 #1441 #1607
* Material You theme (follow system colors) #1469
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId "com.kunzisoft.keepass"
minSdkVersion 15
targetSdkVersion 33
versionCode = 123
versionName = "4.0.0"
versionCode = 124
versionName = "4.0.1"
multiDexEnabled true

testApplicationId = "com.kunzisoft.keepass.tests"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import android.app.SearchManager
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.graphics.Color
import android.graphics.PorterDuff
import android.net.Uri
import android.os.Build
Expand All @@ -50,9 +49,7 @@ import androidx.appcompat.view.ActionMode
import androidx.appcompat.widget.SearchView
import androidx.appcompat.widget.Toolbar
import androidx.coordinatorlayout.widget.CoordinatorLayout
import androidx.core.content.ContextCompat
import androidx.core.view.GravityCompat
import androidx.core.view.WindowCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.WindowInsetsControllerCompat
import androidx.core.view.isVisible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.kunzisoft.keepass.activities.legacy
import android.os.Bundle
import android.view.View
import android.widget.Toast
import androidx.activity.OnBackPressedCallback
import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.helpers.EntrySelectionHelper
import com.kunzisoft.keepass.activities.helpers.SpecialMode
Expand Down Expand Up @@ -33,7 +34,9 @@ abstract class DatabaseModeActivity : DatabaseActivity() {
* To call the regular onBackPressed() method in special mode
*/
protected fun onRegularBackPressed() {
onBackPressedDispatcher.onBackPressed()
// Do not call onBackPressedDispatcher.onBackPressed() to avoid loop
// Calling onBackPressed() is now deprecated, directly finish the activity
finish()
}

/**
Expand Down Expand Up @@ -100,6 +103,12 @@ abstract class DatabaseModeActivity : DatabaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
onDatabaseBackPressed()
}
})

mSpecialMode = EntrySelectionHelper.retrieveSpecialModeFromIntent(intent)
mTypeMode = EntrySelectionHelper.retrieveTypeModeFromIntent(intent)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,16 @@
*/
package com.kunzisoft.keepass.settings

import android.os.Bundle
import android.view.MenuItem
import androidx.appcompat.widget.Toolbar
import androidx.preference.PreferenceFragmentCompat
import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.legacy.DatabaseModeActivity

class AutofillSettingsActivity : DatabaseModeActivity() {
class AutofillSettingsActivity : ExternalSettingsActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

setContentView(R.layout.activity_toolbar)
val toolbar = findViewById<Toolbar>(R.id.toolbar)
toolbar.setTitle(R.string.autofill_preference_title)
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)

if (savedInstanceState == null) {
supportFragmentManager.beginTransaction()
.replace(R.id.fragment_container, AutofillSettingsFragment())
.commit()
}
override fun retrieveTitle(): Int {
return R.string.autofill_preference_title
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
android.R.id.home -> onDatabaseBackPressed()
}

return super.onOptionsItemSelected(item)
override fun retrievePreferenceFragment(): PreferenceFragmentCompat {
return AutofillSettingsFragment()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.kunzisoft.keepass.settings

import android.os.Bundle
import android.view.MenuItem
import androidx.annotation.StringRes
import androidx.appcompat.widget.Toolbar
import androidx.preference.PreferenceFragmentCompat
import com.google.android.material.floatingactionbutton.FloatingActionButton
import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.legacy.DatabaseModeActivity

abstract class ExternalSettingsActivity : DatabaseModeActivity() {

private var lockView: FloatingActionButton? = null

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)

setContentView(R.layout.activity_toolbar)
val toolbar = findViewById<Toolbar>(R.id.toolbar)
toolbar.setTitle(retrieveTitle())
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)

lockView = findViewById(R.id.lock_button)
lockView?.hide()

if (savedInstanceState == null) {
supportFragmentManager.beginTransaction()
.replace(R.id.fragment_container, retrievePreferenceFragment())
.commit()
}
}

@StringRes
abstract fun retrieveTitle(): Int

abstract fun retrievePreferenceFragment(): PreferenceFragmentCompat

override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
android.R.id.home -> onDatabaseBackPressed()
}

return super.onOptionsItemSelected(item)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,37 +19,17 @@
*/
package com.kunzisoft.keepass.settings

import android.os.Bundle
import androidx.appcompat.widget.Toolbar
import android.view.MenuItem

import androidx.preference.PreferenceFragmentCompat
import com.kunzisoft.keepass.R
import com.kunzisoft.keepass.activities.legacy.DatabaseModeActivity

class MagikeyboardSettingsActivity : DatabaseModeActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
class MagikeyboardSettingsActivity : ExternalSettingsActivity() {

setContentView(R.layout.activity_toolbar)
val toolbar = findViewById<Toolbar>(R.id.toolbar)
toolbar.setTitle(R.string.keyboard_setting_label)
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)

if (savedInstanceState == null) {
supportFragmentManager.beginTransaction()
.replace(R.id.fragment_container, MagikeyboardSettingsFragment())
.commit()
}
override fun retrieveTitle(): Int {
return R.string.keyboard_setting_label
}

override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
android.R.id.home -> onDatabaseBackPressed()
}

return super.onOptionsItemSelected(item)
override fun retrievePreferenceFragment(): PreferenceFragmentCompat {
return MagikeyboardSettingsFragment()
}

}
20 changes: 9 additions & 11 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -427,17 +427,15 @@
<string name="hide_expired_entries_summary">Abgelaufene Einträge werden nicht angezeigt</string>
<string name="style_choose_title">App-Design</string>
<string name="style_choose_summary">In der App verwendetes Design</string>
<string-array name="list_style_names">
<item>Wald</item>
<item>Göttlich</item>
<item>Klassisch</item>
<item>Einfach</item>
<item>Mond</item>
<item>Sonne</item>
<item>Antwort</item>
<item>Kunzite</item>
<item>System verfolgen</item>
</string-array>
<string name="style_name_forest">Wald</string>
<string name="style_name_divine">Göttlich</string>
<string name="style_name_classic">Klassisch</string>
<string name="style_name_simple">Einfach</string>
<string name="style_name_moon">Mond</string>
<string name="style_name_sun">Sonne</string>
<string name="style_name_reply">Antwort</string>
<string name="style_name_kunzite">Kunzite</string>
<string name="style_name_follow_system">System verfolgen</string>
<string name="warning_database_read_only">Schreibrechte gewähren, um Datenbankänderungen zu speichern</string>
<string name="education_setup_OTP_summary">Einmal-Passwortverwaltung (HOTP/TOTP) einrichten, um Token für Zwei-Faktor-Authentifizierung (2FA) zu generieren.</string>
<string name="education_setup_OTP_title">OTP einrichten</string>
Expand Down
22 changes: 11 additions & 11 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,17 +262,17 @@
</string-array>
<string name="style_choose_title">Thème de l’application</string>
<string name="style_choose_summary">Thème utilisé dans l’application</string>
<string-array name="list_style_names">
<item>Forêt</item>
<item>Divin</item>
<item>Classique</item>
<item>Simple</item>
<item>Lune</item>
<item>Soleil</item>
<item>Réponse</item>
<item>Kunzite</item>
<item>Suivre le système</item>
</string-array>
<string name="style_name_forest">Forêt</string>
<string name="style_name_divine">Divin</string>
<string name="style_name_classic">Classique</string>
<string name="style_name_simple">Simple</string>
<string name="style_name_moon">Lune</string>
<string name="style_name_sun">Soleil</string>
<string name="style_name_reply">Réponse</string>
<string name="style_name_kunzite">Kunzite</string>
<string name="style_name_follow_system">Suivre le système</string>
<string name="style_name_light">Lumière</string>
<string name="style_name_dark">Ombre</string>
<string name="icon_pack_choose_title">Collection d’icônes</string>
<string name="icon_pack_choose_summary">Collection d’icônes utilisées dans l’application</string>
<string name="menu_copy">Copier</string>
Expand Down
12 changes: 1 addition & 11 deletions app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -468,17 +468,7 @@
</string-array>
<string name="style_choose_title">アプリのテーマ</string>
<string name="style_choose_summary">アプリで使用するテーマ</string>
<string-array name="list_style_names">
<item>Forest</item>
<item>Divine</item>
<item>Classic</item>
<item>Simple</item>
<item>Moon</item>
<item>Sun</item>
<item>Reply</item>
<item>Kunzite</item>
<item>システムに従う</item>
</string-array>
<string name="style_name_follow_system">システムに従う</string>
<string name="icon_pack_choose_title">アイコンパック</string>
<string name="icon_pack_choose_summary">アプリで使用するアイコンパック</string>
<string name="hide_expired_entries_title">有効期限切れのエントリーを非表示にする</string>
Expand Down
35 changes: 23 additions & 12 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -693,23 +693,34 @@
</string-array>
<string name="style_choose_title">App theme</string>
<string name="style_choose_summary">Theme used in the app</string>
<string name="style_name_forest">Forest</string>
<string name="style_name_divine">Divine</string>
<string name="style_name_classic">Classic</string>
<string name="style_name_simple">Simple</string>
<string name="style_name_moon">Moon</string>
<string name="style_name_sun">Sun</string>
<string name="style_name_reply">Reply</string>
<string name="style_name_kunzite">Kunzite</string>
<string name="style_name_follow_system">Follow the system</string>
<string-array name="list_style_names">
<item>Forest</item>
<item>Divine</item>
<item>Classic</item>
<item>Simple</item>
<item>Moon</item>
<item>Sun</item>
<item>Reply</item>
<item>Kunzite</item>
<item>Follow the system</item>
<item>@string/style_name_forest</item>
<item>@string/style_name_divine</item>
<item>@string/style_name_classic</item>
<item>@string/style_name_simple</item>
<item>@string/style_name_moon</item>
<item>@string/style_name_sun</item>
<item>@string/style_name_reply</item>
<item>@string/style_name_kunzite</item>
<item>@string/style_name_follow_system</item>
</string-array>
<string name="style_brightness_title">Theme brightness</string>
<string name="style_brightness_summary">Select light or dark themes</string>
<string name="style_name_light">Light</string>
<string name="style_name_dark">Dark</string>
<string-array name="list_style_brightness_names">
<item>Light</item>
<item>Dark</item>
<item>Follow the system</item>
<item>@string/style_name_light</item>
<item>@string/style_name_dark</item>
<item>@string/style_name_follow_system</item>
</string-array>
<string name="icon_section_standard">Standard</string>
<string name="icon_section_custom">Custom</string>
Expand Down
3 changes: 3 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/124.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Fix back lock #1635 #1629 #1634
* Fix lock button in settings #1630
* Improve theme translation #1631
3 changes: 3 additions & 0 deletions fastlane/metadata/android/fr-FR/changelogs/124.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* Correction du verrouillage de retour #1635 #1629 #1634
* Correction du bouton de verrouillage dans les paramètres #1630
* Amélioration des traductions de thèmes #1631

0 comments on commit c6723ec

Please sign in to comment.