Compare commits
	
		
			1 Commits
		
	
	
		
			1327--repl
			...
			2488-fix-c
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | f4b5eee171 | 
| @@ -434,7 +434,7 @@ namespace Kp2aAutofillParser | |||||||
|         public static List<string> ConvertToCanonicalLowerCaseHints(string[] supportedHints) |         public static List<string> ConvertToCanonicalLowerCaseHints(string[] supportedHints) | ||||||
|         { |         { | ||||||
|             List<string> result = new List<string>(); |             List<string> result = new List<string>(); | ||||||
|             foreach (string hint in supportedHints) |             foreach (string hint in supportedHints.Where(h => h != null)) | ||||||
|             { |             { | ||||||
|                 var canonicalHint = ToCanonicalHint(hint); |                 var canonicalHint = ToCanonicalHint(hint); | ||||||
|                 result.Add(canonicalHint.ToLower()); |                 result.Add(canonicalHint.ToLower()); | ||||||
| @@ -829,7 +829,7 @@ namespace Kp2aAutofillParser | |||||||
|             // * if there is no such autofill hint, we use IsPassword to  |             // * if there is no such autofill hint, we use IsPassword to  | ||||||
|  |  | ||||||
|             HashSet<string> autofillHintsOfAllFields = autofillView.InputFields.Where(f => f.AutofillHints != null) |             HashSet<string> autofillHintsOfAllFields = autofillView.InputFields.Where(f => f.AutofillHints != null) | ||||||
|                 .SelectMany(f => f.AutofillHints).Select(AutofillHintsHelper.ToCanonicalHint).ToHashSet(); |                 .SelectMany(f => f.AutofillHints).Where(x => x != null).Select(AutofillHintsHelper.ToCanonicalHint).ToHashSet(); | ||||||
|             bool hasLoginAutofillHints = autofillHintsOfAllFields.Intersect(_autofillHintsForLogin).Any(); |             bool hasLoginAutofillHints = autofillHintsOfAllFields.Intersect(_autofillHintsForLogin).Any(); | ||||||
|  |  | ||||||
|             if (hasLoginAutofillHints) |             if (hasLoginAutofillHints) | ||||||
| @@ -839,9 +839,9 @@ namespace Kp2aAutofillParser | |||||||
|                     string[] viewHints = viewNode.AutofillHints; |                     string[] viewHints = viewNode.AutofillHints; | ||||||
|                     if (viewHints == null) |                     if (viewHints == null) | ||||||
|                         continue; |                         continue; | ||||||
|                     if (viewHints.Select(AutofillHintsHelper.ToCanonicalHint).Intersect(_autofillHintsForLogin).Any()) |                     if (viewHints.Where(h => h != null).Select(AutofillHintsHelper.ToCanonicalHint).Intersect(_autofillHintsForLogin).Any()) | ||||||
|                     { |                     { | ||||||
|                         AddFieldToHintMap(viewNode, viewHints.Select(AutofillHintsHelper.ToCanonicalHint).ToHashSet().ToArray()); |                         AddFieldToHintMap(viewNode, viewHints.Where(h => h != null).Select(AutofillHintsHelper.ToCanonicalHint).ToHashSet().ToArray()); | ||||||
|                     } |                     } | ||||||
|  |  | ||||||
|                 } |                 } | ||||||
|   | |||||||
| @@ -937,9 +937,10 @@ namespace keepass2android | |||||||
| 				iv.SetImageDrawable(Resources.GetDrawable(Resource.Drawable.ic00)); | 				iv.SetImageDrawable(Resources.GetDrawable(Resource.Drawable.ic00)); | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|             SupportActionBar.Title = Entry.Strings.ReadSafe(PwDefs.TitleField); |             SupportActionBar.Title = Entry.Strings.ReadSafe(PwDefs.TitleField); | ||||||
|             SupportActionBar.Title = SprEngine.Compile(SupportActionBar.Title, new SprContext(Entry, App.Kp2a.CurrentDb.KpDatabase, SprCompileFlags.All)); |             SupportActionBar.SetDisplayHomeAsUpEnabled(true); | ||||||
| 			SupportActionBar.SetDisplayHomeAsUpEnabled(true); |  | ||||||
|             SupportActionBar.SetHomeButtonEnabled(true); |             SupportActionBar.SetHomeButtonEnabled(true); | ||||||
|  |  | ||||||
| 			PopulateGroupText (Resource.Id.entry_group_name, Resource.Id.entryfield_group_container, KeyGroupFullPath); | 			PopulateGroupText (Resource.Id.entry_group_name, Resource.Id.entryfield_group_container, KeyGroupFullPath); | ||||||
|   | |||||||
| @@ -30,7 +30,6 @@ using KeePassLib; | |||||||
| using KeePassLib.Utility; | using KeePassLib.Utility; | ||||||
| using System.Threading; | using System.Threading; | ||||||
| using System.Collections.Generic; | using System.Collections.Generic; | ||||||
| using KeePass.Util.Spr; |  | ||||||
|  |  | ||||||
| namespace keepass2android.search | namespace keepass2android.search | ||||||
| { | { | ||||||
| @@ -295,10 +294,7 @@ namespace keepass2android.search | |||||||
|                             return Position.ToString(CultureInfo.InvariantCulture); |                             return Position.ToString(CultureInfo.InvariantCulture); | ||||||
|                         case 1: // SuggestColumnText1 |                         case 1: // SuggestColumnText1 | ||||||
|                             string username = CurrentEntry.Strings.ReadSafe(PwDefs.UserNameField); |                             string username = CurrentEntry.Strings.ReadSafe(PwDefs.UserNameField); | ||||||
| 							username = SprEngine.Compile(username, new SprContext(CurrentEntry, App.Kp2a.CurrentDb.KpDatabase, SprCompileFlags.All)); |                             return CurrentEntry.Strings.ReadSafe(PwDefs.TitleField) + (string.IsNullOrWhiteSpace(username) ? "" : " ("+username+")"); | ||||||
|                             var title = CurrentEntry.Strings.ReadSafe(PwDefs.TitleField); |  | ||||||
|                             title = SprEngine.Compile(title, new SprContext(CurrentEntry, App.Kp2a.CurrentDb.KpDatabase, SprCompileFlags.All)); |  | ||||||
|                             return title + (string.IsNullOrWhiteSpace(username) ? "" : " ("+username+")"); |  | ||||||
|                         case 2: // SuggestColumnText2 |                         case 2: // SuggestColumnText2 | ||||||
|                                 return Internationalise(_entriesWithContexts[Position].resultContext); |                                 return Internationalise(_entriesWithContexts[Position].resultContext); | ||||||
|                         case 3: // SuggestColumnIcon1 |                         case 3: // SuggestColumnIcon1 | ||||||
|   | |||||||
| @@ -10,7 +10,6 @@ using Android.OS; | |||||||
| using Android.Runtime; | using Android.Runtime; | ||||||
| using Android.Views; | using Android.Views; | ||||||
| using Android.Widget; | using Android.Widget; | ||||||
| using KeePass.Util.Spr; |  | ||||||
| using keepass2android.services.AutofillBase; | using keepass2android.services.AutofillBase; | ||||||
| using keepass2android.services.AutofillBase.model; | using keepass2android.services.AutofillBase.model; | ||||||
| using Keepass2android.Pluginsdk; | using Keepass2android.Pluginsdk; | ||||||
| @@ -109,7 +108,6 @@ namespace keepass2android.services.Kp2aAutofill | |||||||
|  |  | ||||||
|  |  | ||||||
|             fieldCollection.DatasetName = pwEntry.Strings.ReadSafe(PwDefs.TitleField); |             fieldCollection.DatasetName = pwEntry.Strings.ReadSafe(PwDefs.TitleField); | ||||||
|             fieldCollection.DatasetName = SprEngine.Compile(fieldCollection.DatasetName, new SprContext(pwEntry, App.Kp2a.CurrentDb.KpDatabase, SprCompileFlags.All)); |  | ||||||
|  |  | ||||||
|             return fieldCollection; |             return fieldCollection; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -125,8 +125,7 @@ namespace keepass2android.view | |||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			String title = pw.Strings.ReadSafe(PwDefs.TitleField); | 			String title = pw.Strings.ReadSafe(PwDefs.TitleField); | ||||||
|             title = SprEngine.Compile(title, new SprContext(_entry, db.KpDatabase, SprCompileFlags.All)); | 			var str = new SpannableString(title); | ||||||
|             var str = new SpannableString(title); |  | ||||||
|  |  | ||||||
| 			if (isExpired) | 			if (isExpired) | ||||||
| 			{ | 			{ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user