Compare commits
	
		
			1 Commits
		
	
	
		
			2458--seed
			...
			2466--redu
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | dfd101da77 | 
| @@ -31,8 +31,17 @@ namespace PluginTOTP | |||||||
| 				_muteWarnings = muteWarnings; | 				_muteWarnings = muteWarnings; | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			 | 			/// <summary> | ||||||
| 			internal bool HasSeed(IDictionary<string, string> entryFields) | 			/// Check if specified Entry contains Settings that are not null. | ||||||
|  | 			/// </summary> | ||||||
|  | 			internal bool SettingsCheck(IDictionary<string, string> entryFields) | ||||||
|  | 			{ | ||||||
|  | 				string settings; | ||||||
|  | 				entryFields.TryGetValue(SettingsFieldName, out settings); | ||||||
|  | 				return !String.IsNullOrEmpty(settings); | ||||||
|  | 			} | ||||||
|  |  | ||||||
|  | 			internal bool SeedCheck(IDictionary<string, string> entryFields) | ||||||
| 			{ | 			{ | ||||||
| 				string seed; | 				string seed; | ||||||
| 				entryFields.TryGetValue(SeedFieldName, out seed); | 				entryFields.TryGetValue(SeedFieldName, out seed); | ||||||
| @@ -91,15 +100,15 @@ namespace PluginTOTP | |||||||
| 			} | 			} | ||||||
|  |  | ||||||
| 			private string[] SettingsGet(IDictionary<string, string> entryFields) | 			private string[] SettingsGet(IDictionary<string, string> entryFields) | ||||||
|             { | 			{ | ||||||
|                 return entryFields.TryGetValue(SettingsFieldName, out var settings) ? settings.Split(';') : new[] { "30", "6" }; | 				return entryFields[SettingsFieldName].Split(';'); | ||||||
|             } | 			} | ||||||
|  |  | ||||||
| 			public TotpData GetTotpData(IDictionary<string, string> entryFields) | 			public TotpData GetTotpData(IDictionary<string, string> entryFields) | ||||||
| 			{ | 			{ | ||||||
| 				TotpData res = new TotpData(); | 				TotpData res = new TotpData(); | ||||||
|  |  | ||||||
| 				if (HasSeed(entryFields)) | 				if (SettingsCheck(entryFields) && SeedCheck(entryFields)) | ||||||
| 				{ | 				{ | ||||||
| 					bool ValidInterval; bool ValidLength; bool ValidUrl; | 					bool ValidInterval; bool ValidLength; bool ValidUrl; | ||||||
| 					if (SettingsValidate(entryFields, out ValidInterval, out ValidLength, out ValidUrl)) | 					if (SettingsValidate(entryFields, out ValidInterval, out ValidLength, out ValidUrl)) | ||||||
|   | |||||||
| @@ -80,7 +80,6 @@ namespace keepass2android.view | |||||||
| 		private void PopulateView(View gv, PwGroup pw) | 		private void PopulateView(View gv, PwGroup pw) | ||||||
|         { |         { | ||||||
| 			_pwGroup = pw; | 			_pwGroup = pw; | ||||||
|             Kp2aLog.Log($"Populating group view {_groupBaseActivity.IsFinishing} {pw.Name}"); |  | ||||||
|  |  | ||||||
|             if (_groupBaseActivity.IsFinishing) |             if (_groupBaseActivity.IsFinishing) | ||||||
|                 return; |                 return; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user