Skip to content

Commit

Permalink
recreate group activity when list text size was changed
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippC committed Dec 31, 2024
1 parent 2ad073c commit 0e3ef76
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/keepass2android-appSdkStyle/GroupBaseActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ public abstract class GroupBaseActivity : LockCloseActivity
public const String KeyEntry = "entry";
public const String KeyMode = "mode";

private float _currentListTextSize;

public const int RequestCodeActivateRealSearch = 12366;

static readonly Dictionary<int /*resource id*/, int /*prio*/> bottomBarElementsPriority = new Dictionary<int, int>()
Expand Down Expand Up @@ -279,6 +281,11 @@ protected override void OnResume()
//can happen e.g. after theme change
return;
}
if (PrefsUtil.GetListTextSize(this) != _currentListTextSize)
{
Recreate();
return;
}
AppTask.StartInGroupActivity(this);
AppTask.SetupGroupBaseActivityButtons(this);

Expand Down Expand Up @@ -514,6 +521,7 @@ public virtual bool IsSearchResult
protected override void OnCreate(Bundle savedInstanceState)
{
_design.ApplyTheme();
_currentListTextSize = PrefsUtil.GetListTextSize(this);
base.OnCreate(savedInstanceState);

Android.Util.Log.Debug("KP2A", "Creating GBA");
Expand Down

0 comments on commit 0e3ef76

Please sign in to comment.