mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-21 14:29:13 +00:00
Some misc fixes
This commit is contained in:
parent
152cc8b562
commit
a2e5504eef
6 changed files with 12 additions and 8 deletions
|
@ -310,7 +310,7 @@ public class EditEntryActivity extends AegisActivity {
|
|||
finish(true);
|
||||
});
|
||||
break;
|
||||
case R.id.action_default_image:
|
||||
case R.id.action_default_icon:
|
||||
TextDrawable drawable = TextDrawableHelper.generate(_entry.getIssuer(), _entry.getName(), _iconView);
|
||||
_iconView.setImageDrawable(drawable);
|
||||
_hasCustomImage = false;
|
||||
|
@ -328,7 +328,7 @@ public class EditEntryActivity extends AegisActivity {
|
|||
menu.findItem(R.id.action_delete).setVisible(false);
|
||||
}
|
||||
if (!_hasCustomImage) {
|
||||
menu.findItem(R.id.action_default_image).setVisible(false);
|
||||
menu.findItem(R.id.action_default_icon).setVisible(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -99,7 +99,7 @@ public class MainActivity extends AegisActivity implements EntryListView.Listene
|
|||
setIntent(intent);
|
||||
|
||||
if (!doShortcutActions() || _db.isLocked()) {
|
||||
startAuthActivity();
|
||||
unlockDatabase(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -155,6 +155,7 @@ public class MainActivity extends AegisActivity implements EntryListView.Listene
|
|||
} else if (data.getBooleanExtra("needsRefresh", false)) {
|
||||
boolean showIssuer = getPreferences().isIssuerVisible();
|
||||
_entryListView.setShowIssuer(showIssuer);
|
||||
_entryListView.refresh(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -361,6 +362,10 @@ public class MainActivity extends AegisActivity implements EntryListView.Listene
|
|||
}
|
||||
|
||||
private void unlockDatabase(MasterKey key) {
|
||||
if (_loaded) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (!_db.isLoaded()) {
|
||||
_db.load();
|
||||
|
|
|
@ -142,7 +142,7 @@ public class PreferencesFragment extends PreferenceFragmentCompat implements Pas
|
|||
if (!_db.getFile().isEncrypted()) {
|
||||
PasswordDialogFragment dialog = new PasswordDialogFragment();
|
||||
// TODO: find a less ugly way to obtain the fragment manager
|
||||
dialog.show(((AppCompatActivity)getActivity()).getSupportFragmentManager(), null);
|
||||
dialog.show(getActivity().getSupportFragmentManager(), null);
|
||||
} else {
|
||||
new AlertDialog.Builder(getActivity())
|
||||
.setTitle("Disable encryption")
|
||||
|
|
|
@ -131,7 +131,6 @@ public class EntryListView extends Fragment implements EntryAdapter.Listener {
|
|||
|
||||
public void setShowIssuer(boolean showIssuer) {
|
||||
_adapter.setShowIssuer(showIssuer);
|
||||
_adapter.refresh(true);
|
||||
}
|
||||
|
||||
public void addEntry(DatabaseEntry entry) {
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/action_default_image"
|
||||
android:title="@string/action_default_image"
|
||||
android:id="@+id/action_default_icon"
|
||||
android:title="@string/action_default_icon"
|
||||
app:showAsAction="never"/>
|
||||
</menu>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<string name="action_settings">Settings</string>
|
||||
<string name="action_import">Import</string>
|
||||
<string name="action_delete">Delete</string>
|
||||
<string name="action_default_image">Set default image</string>
|
||||
<string name="action_default_icon">Restore default icon</string>
|
||||
<string name="discard">Discard</string>
|
||||
<string name="save">Save</string>
|
||||
<string name="title_activity_intro">IntroActivity</string>
|
||||
|
|
Loading…
Add table
Reference in a new issue