Compare commits

...

2 Commits

Author SHA1 Message Date
Philipp Crocoll
3f13d55dd8 stability improvements 2025-08-19 12:23:20 +02:00
Philipp Crocoll
b0ad8c3587 manifest for 1.13-r1 2025-07-29 17:36:51 +02:00
5 changed files with 38 additions and 20 deletions

View File

@@ -12,20 +12,21 @@ namespace KeePass.Util
public static string GetErrorMessage(Exception e)
{
string errorMessage = e.Message;
if (e is Java.Lang.Exception javaException)
try
{
try
string errorMessage = e.Message;
if (e is Java.Lang.Exception javaException)
{
errorMessage = javaException.LocalizedMessage ?? javaException.Message ?? errorMessage;
}
finally
{
}
return errorMessage;
}
catch
{
return "";
}
return errorMessage;
}
}

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="222"
android:versionName="1.13-r0"
android:versionCode="235"
android:versionName="1.13-r1"
package="keepass2android.keepass2android"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="auto">

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="222"
android:versionName="1.13-r0"
android:versionCode="235"
android:versionName="1.13-r1"
package="keepass2android.keepass2android_nonet"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="auto">

View File

@@ -131,7 +131,15 @@ namespace keepass2android.view
ev.FindViewById(Resource.Id.icon).Visibility = ViewStates.Visible;
ev.FindViewById(Resource.Id.check_mark).Visibility = ViewStates.Invisible;
_db = App.Kp2a.FindDatabaseForElement(_entry);
_db = App.Kp2a.TryFindDatabaseForElement(_entry);
if (_db == null)
{
ev.FindViewById(Resource.Id.icon).Visibility = ViewStates.Gone;
_textView.TextFormatted = new SpannableString("(no data)");
_textviewDetails.Visibility = ViewStates.Gone;
_textgroupFullPath.Visibility = ViewStates.Gone;
return;
}
ImageView iv = (ImageView)ev.FindViewById(Resource.Id.icon);
bool isExpired = pw.Expires && pw.ExpiryTime < DateTime.Now;
@@ -209,11 +217,6 @@ namespace keepass2android.view
UpdateTotp();
}
public void ConvertView(PwEntry pw, int pos)

View File

@@ -15,14 +15,15 @@ This file is part of Keepass2Android, Copyright 2013 Philipp Crocoll. This file
along with Keepass2Android. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using Android.Graphics;
using Android.OS;
using Android.Runtime;
using Android.Text;
using Android.Views;
using Android.Widget;
using keepass2android;
using KeePassLib;
using System;
using Object = Java.Lang.Object;
namespace keepass2android.view
@@ -64,7 +65,20 @@ namespace keepass2android.view
_label = (TextView) gv.FindViewById(Resource.Id.group_label);
_label.TextSize = size-8;
Database db = App.Kp2a.FindDatabaseForElement(pw);
Database db = App.Kp2a.TryFindDatabaseForElement(pw);
if (db == null)
{
gv.FindViewById(Resource.Id.group_icon_bkg).Visibility = ViewStates.Gone;
gv.FindViewById(Resource.Id.icon).Visibility = ViewStates.Gone;
gv.FindViewById(Resource.Id.check_mark).Visibility = ViewStates.Invisible;
_textview.Text = "(no data)";
_label.Text = "";
return;
}
gv.FindViewById(Resource.Id.group_icon_bkg).Visibility = db.DrawableFactory.IsWhiteIconSet ? ViewStates.Visible : ViewStates.Gone;